Merge pull request #1087 from progrium/mh-docker-options-ni-exit

make docker-options adhere to DOKKU_NOT_IMPLEMENTED_EXIT pattern
This commit is contained in:
Michael Hobbs
2015-04-03 11:32:24 -07:00
2 changed files with 7 additions and 3 deletions

6
dokku
View File

@@ -177,17 +177,17 @@ EOF
implemented=0
for script in $PLUGIN_PATH/*/commands; do
set +e; $script "$@" ; exit_code=$? ; set -e
if [ "$exit_code" -eq "$DOKKU_NOT_IMPLEMENTED_EXIT" ]; then
if [[ "$exit_code" -eq "$DOKKU_NOT_IMPLEMENTED_EXIT" ]]; then
continue
fi
implemented=1
if [ "$exit_code" -ne "$DOKKU_VALID_EXIT" ]; then
if [[ "$exit_code" -ne "$DOKKU_VALID_EXIT" ]]; then
exit $exit_code
fi
done
if [ "$implemented" -eq 0 ]; then
if [[ "$implemented" -eq 0 ]]; then
dokku_log_warn "\`$*\` is not a dokku command."
dokku_log_warn "See \`dokku help\` for a list of available commands."
exit 1

View File

@@ -146,4 +146,8 @@ case "$1" in
EOF
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac