The module can not be uninstalled with drush. I tried this with a direct `drush en` and `drush pmu` and it fails with the following error:

$ drush en roleassign
[success] Successfully enabled: roleassign
$ drush pmu roleassign                                                                            
[error]  roleassign: You are not allowed to disable this module. 

This is somewhat critical, because it breaks `drush cim` when you try to import a configuration that has roleassign disabled.

Comments

bserem created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new1.26 KB

Attached patch implements a bypass for uninstall validation for cli requests, such as Drush.

  • idebr authored 7beff90 on 8.x-1.x
    Issue #2935117 by idebr: Can't uninstall with Drush
    
salvis’s picture

Thank you for the report and patch, idebr!

salvis’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

hugronaphor’s picture

StatusFileSize
new586 bytes

Based on this discussion: https://www.drupal.org/project/drupal/issues/2904700

Can we extend the isCli() method accordingly?

idebr’s picture

@hugronaphor Considering this issue has been closed for a long time I think creating a new issue would increase visibility. Closed issues are not displayed in the issue overview.

hugronaphor’s picture