-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pm:enable installs a module even if hook_requirements returns 'severity' => REQUIREMENT_ERROR #6006
Comments
Just as a workaround, if this is a custom module you can add an exception for Drush. In the example below it prevents installing a module anywhere except locally on DDEV.
|
Thanks Simon! |
The requirement check only stops for interactive requests. Passing -y makes it non-interactive. This could be changed now that we have a new major version (13). |
I'm going to call this 'By Design'. The behavior you seek happens when you pass --no-interaction instead of of --yes. --yes is like passing --no-interaction with the addition of auto-replying 'yes'. to each confirmation prompt. Thats usually the equivalent to --no-interaction but some prompts, like this one, default to no and thus passing --yes overrides the default. |
I don't really understand this. Via the UI it's not possible to install it under any circumstance when hook_requirements returns REQUIREMENT_ERROR. It's got nothing to do with the arguments passed in. |
Drush is currently more permissive than the core UI. I think there is an argument for and against that. |
If we run the following command: drush en -y my_module and the hook_requirements returns 'severity' => REQUIREMENT_ERROR then Drush display the error message but still enables the module.
System Configuration
Additional information
The similar 4874 issue is marked as closed here: #4874
The text was updated successfully, but these errors were encountered: