Why would anyone ever uninstall such an amazing module...
...but I guess we should still not throw any errors. Just hit this locally when running drush pmu libraries -y
:
The following extensions will be uninstalled: libraries
Do you really want to continue? (y/n): y
rmdir(/var/www/html/d8/sites/default/files/library-definitions): [warning]
Directory not empty FileSystem.php:256
So I guess we need to clear out the local library definitions before removing the directory.
Also (and this is theoretically a separate issue, but I guess it's worth bringing up) we should probably use the configured library definitions path instead of hardcoding it.
Comment | File | Size | Author |
---|---|---|---|
#3 | error_when_uninstalling-2836285-3.patch | 523 bytes | gfcamilo |
|
Comments
Comment #2
gfcamilo CreditAttribution: gfcamilo at CI&T commentedComment #3
gfcamilo CreditAttribution: gfcamilo at CI&T commentedComment #4
tstoecklerOoh, that's neat. Forgot this function existed. Thanks!!
Comment #6
rjacobs CreditAttribution: rjacobs commentedVery cool. That definitely seems to get the job done. I went ahead and committed.
Comment #7
rjacobs CreditAttribution: rjacobs commentedAlso I see that this bit is potentially pending:
I suppose having that hardcoded would be alright as long as it's matched to what's in the shipped config and libraries_install(). Perhaps we should only take responsibility to remove what we installed, not what was configured... though I suppose the local registry doesn't have any purpose without the module installed (unless it's set to something like a
public://some/path
URI and mixed with some other non-library files). Anyway, this could possibly be dealt with in an issues I just opened: #2841071: Add admin conf GUI. That issues could actually expose the conf in a way that might start affecting things like this.