Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Bash script to get different exit codes upon the bin/magento setup:db:status command
# use --no-ansi to avoid color characters
message=$(bin/magento setup:db:status --no-ansi)
if [[ ${message:0:3} == "All" ]];
exit 0 # 0 not required being default exit code; used for clarity
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment