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:
commit
5c938fee8a
2 files changed
+7
-3
No files matched your search
@@ -177,17 +177,17 @@ EOF
|
|||||||
implemented=0
|
implemented=0
|
||||||
for script in $PLUGIN_PATH/*/commands; do
|
for script in $PLUGIN_PATH/*/commands; do
|
||||||
set +e; $script "$@" ; exit_code=$? ; set -e
|
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
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
implemented=1
|
implemented=1
|
||||||
if [ "$exit_code" -ne "$DOKKU_VALID_EXIT" ]; then
|
if [[ "$exit_code" -ne "$DOKKU_VALID_EXIT" ]]; then
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$implemented" -eq 0 ]; then
|
if [[ "$implemented" -eq 0 ]]; then
|
||||||
dokku_log_warn "\`$*\` is not a dokku command."
|
dokku_log_warn "\`$*\` is not a dokku command."
|
||||||
dokku_log_warn "See \`dokku help\` for a list of available commands."
|
dokku_log_warn "See \`dokku help\` for a list of available commands."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -146,4 +146,8 @@ case "$1" in
|
|||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
Reference in new issue
Block a user