0

I need the test to only do a backup before an upgrade will take place. I use version 8.01 and I use the following command:

drush up -n

This seems to return zero when there are no updates and 75 when there are, but I need to be sure about this.

Apparently 75 means user abort. Apparently on an up-to-date site, the upgrade process is not interrupted by the "-n" because there is nothing to upgrade and it exits normally.

On an outdated site "-n" will cause the upgrade process to be interrupted and 75 exit code is returned. Please confirm this reasoning is correct, so that I can use it in my script.

0

1 Answer 1

0

The exit codes are defined in includes/drush.inc. Your logic seems sound, but I can't verify that is correct/always will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.