Merge pull request #2492 from dokku/jg-2481-proxy-command

Fix iteration on all apps for `dokku proxy` command
This commit is contained in:
Jose Diaz-Gonzalez
2016-11-20 16:19:10 -07:00
committed by GitHub

View File

@@ -6,13 +6,14 @@ source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_main_cmd() {
declare desc="displays app proxy implementation via command line"
local cmd="proxy"
local ALL_APPS=$(dokku_apps)
if [[ -n "$2" ]]; then
local APP="$2"
[[ "$1" == "$cmd" ]] && shift 1
local APPS=$(dokku_apps)
if [[ -n "$1" ]]; then
local APPS="$1"
fi
local APPS=${APP:="$ALL_APPS"}
dokku_col_log_info1_quiet "App Name" "Proxy Type"
local app
for app in $APPS; do
verify_app_name "$app"
dokku_col_log_msg "$app" "$(get_app_proxy_type "$app")"