Created
August 12, 2016 12:33
-
-
Save aleron75/5b35f8b670ad24bffbca48c0370135ec to your computer and use it in GitHub Desktop.
Bash script to get different exit codes upon the bin/magento setup:db:status command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# use --no-ansi to avoid color characters | |
message=$(bin/magento setup:db:status --no-ansi) | |
if [[ ${message:0:3} == "All" ]]; | |
then | |
exit 0 # 0 not required being default exit code; used for clarity | |
else | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment