From ba33c161f5cb360487488ef947636ee96afab6ef Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Fri, 3 Apr 2015 10:51:23 -0700 Subject: [PATCH] make docker-options adhere to DOKKU_NOT_IMPLEMENTED_EXIT pattern --- dokku | 6 +++--- plugins/docker-options/commands | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dokku b/dokku index 3b4a7c26a..39d6d9781 100755 --- a/dokku +++ b/dokku @@ -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 diff --git a/plugins/docker-options/commands b/plugins/docker-options/commands index d2cc8b496..46bc8a8c0 100755 --- a/plugins/docker-options/commands +++ b/plugins/docker-options/commands @@ -146,4 +146,8 @@ case "$1" in EOF ;; + *) + exit $DOKKU_NOT_IMPLEMENTED_EXIT + ;; + esac