Merge pull request #2557 from dokku/dokku-cli-improvements

Dokku cli improvements
This commit is contained in:
Jose Diaz-Gonzalez
2017-01-16 15:32:11 -07:00
committed by GitHub
5 changed files with 135 additions and 77 deletions

View File

@@ -251,7 +251,12 @@ parse_args() {
declare desc="top-level cli arg parser"
local next_index=1; local skip=false; local args=("$@")
for arg in "$@"; do
$skip && skip=false && continue
if [[ "$skip" == "true" ]]; then
next_index=$(( next_index + 1 ))
skip=false
continue
fi
case "$arg" in
--quiet)
export DOKKU_QUIET_OUTPUT=1
@@ -272,7 +277,7 @@ parse_args() {
export DOKKU_APP_NAME=${args[$next_index]}; skip=true
;;
esac
local next_index=$(( next_index + 1 ))
next_index=$(( next_index + 1 ))
done
return 0
}

View File

@@ -12,6 +12,11 @@ domains_main_cmd() {
dokku_log_info2_quiet "Global Domain Name"
get_global_vhosts
fi
if [[ "$APP" == "--global" ]]; then
return
fi
if [[ -n "$APP" ]]; then
verify_app_name "$APP"
if [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then