- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add a specific exit code when Drush finds security updates #4544
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
Comments
See #3749 for some related prior discussion. I don't think we will be changing this. |
To clarify: I am not against |
#3749 was about converting from returning a non-zero status code to returning a zero status code when there are updates. This is a request to change which status code Drush returns when there are security updates, so that scripts can distinguish between a failure state and a needs-update state. As a general design point, I prefer commands to return no error when they work correctly. However, since Drush is already returning an error status in this case, I think it's better to maintain backwards compatibility and continue to return a non-zero update status when updates are needed. Switching from a generic |
Status code |
This sounds reasonable to PR. What number? |
|
Is your feature request related to a problem? Please describe.
Currently, Drush always returns 1 (
EXIT_FAILURE
) when a command fails.This means that when running
drush sec-php
, our CI tool can not easily distinguish between a real error and available updates.Describe the solution you'd like
It would be useful to have a specific exit code for available updates.
Describe alternatives you've considered
We can
grep
the error output but that is not very clean.Additional context
The exit code is defined here:
drush/src/Commands/DrushCommands.php
Line 32 in cc3035f
And then used here:
drush/src/Commands/pm/SecurityUpdateCommands.php
Line 186 in cc3035f
The text was updated successfully, but these errors were encountered: