diff --git a/dokku b/dokku index dec208114..e96f0db2f 100755 --- a/dokku +++ b/dokku @@ -47,7 +47,9 @@ parse_args "$@" args=("$@") if [[ "${args[0]}" =~ ^--.* ]]; then for arg in "$@"; do - if [[ "$arg" =~ ^--.* ]]; then + if [[ "$arg" == "--app" ]]; then + shift 2 + elif [[ "$arg" =~ ^--.* ]]; then shift 1 else break diff --git a/plugins/common/functions b/plugins/common/functions index d32c5f8ad..9d6f0f3eb 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -196,7 +196,9 @@ is_abs_path() { } parse_args() { + local next_index=1; local skip=false; local args=("$@") for arg in "$@"; do + $skip && skip=false && continue case "$arg" in --quiet) export DOKKU_QUIET_OUTPUT=1 @@ -210,7 +212,11 @@ parse_args() { --force) export DOKKU_APPS_FORCE_DELETE=1 ;; + --app) + export DOKKU_APP_NAME=${args[$next_index]}; skip=true + ;; esac + next_index=$(( next_index + 1 )) done return 0 }