Use dokku_log_fail in all cases where there is an exit 1

This commit is contained in:
Jose Diaz-Gonzalez
2015-09-04 00:17:45 -04:00
parent 76cf4d2969
commit 95161a2a9f
9 changed files with 37 additions and 42 deletions

View File

@@ -9,7 +9,7 @@ case "$1" in
;;
apps:create)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -d "$DOKKU_ROOT/$2" ]] && dokku_log_warn "Name is already taken" && exit 1
APP="$2"
@@ -18,8 +18,8 @@ case "$1" in
;;
apps:destroy)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ "$2" == "tls" ]] && echo "Unable to destroy tls directory" && exit 1
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
[[ "$2" == "tls" ]] && dokku_log_fail "Unable to destroy tls directory"
[[ "$3" == "force" ]] && DOKKU_APPS_FORCE_DELETE=1
APP="$2"; IMAGE_TAG=$(get_running_image_tag $APP)
verify_app_name "$APP"