Correct apps:report to not exit if one app is not deployed

This commit is contained in:
Mriyam Tamuli committed 2016-12-11 13:26:07 +05:30
1 parent a574a6db1c
commit 49b01143a0
1 file changed
+10 -1
+10 -1
View File
@@ -5,6 +5,11 @@ source "$PLUGIN_AVAILABLE_PATH/apps/functions"
report_single_app() { report_single_app() {
local APP="$1"; local APP_DIR="$DOKKU_ROOT/$APP"; local INFO_FLAG="$2" local APP="$1"; local APP_DIR="$DOKKU_ROOT/$APP"; local INFO_FLAG="$2"
local use_echo;
if [[ "$INFO_FLAG" == "true" ]]; then
use_echo=true
INFO_FLAG=""
fi
verify_app_name "$APP" verify_app_name "$APP"
local DOKKU_APP_CIDS=$(get_app_container_ids "$APP") local DOKKU_APP_CIDS=$(get_app_container_ids "$APP")
if [[ -n $DOKKU_APP_CIDS ]]; then if [[ -n $DOKKU_APP_CIDS ]]; then
@@ -30,9 +35,13 @@ report_single_app() {
key="$(echo "${flag#--}" | cut -f1 -d' ' | tr - ' ')" key="$(echo "${flag#--}" | cut -f1 -d' ' | tr - ' ')"
dokku_log_verbose "$(printf "%-20s %-25s" "${key^}" "${flag#*: }")" dokku_log_verbose "$(printf "%-20s %-25s" "${key^}" "${flag#*: }")"
done done
else
if [[ "$use_echo" ]]; then
echo "not deployed"
else else
dokku_log_fail "not deployed" dokku_log_fail "not deployed"
fi fi
fi
else else
local match=false; local value_exists=false local match=false; local value_exists=false
for flag in "${flag_map[@]}"; do for flag in "${flag_map[@]}"; do
@@ -63,7 +72,7 @@ apps_report_cmd() {
if [[ -z $2 ]]; then if [[ -z $2 ]]; then
for APP in $INSTALLED_APPS; do for APP in $INSTALLED_APPS; do
report_single_app "$APP" report_single_app "$APP" "true"
done done
else else
report_single_app "$2" "$3" report_single_app "$2" "$3"