From 0e007a11963991e8d22047fc92cf24710e0c0970 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 13 Dec 2017 23:39:04 -0500 Subject: [PATCH] fix: declare and set variables separately --- plugins/tags/subcommands/deploy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/tags/subcommands/deploy b/plugins/tags/subcommands/deploy index da9eba0a4..35c573595 100755 --- a/plugins/tags/subcommands/deploy +++ b/plugins/tags/subcommands/deploy @@ -6,11 +6,12 @@ source "$PLUGIN_AVAILABLE_PATH/tags/functions" tags_deploy_cmd() { declare desc="deploys an app with a given tagged image via command line" local cmd="tags:deploy" - [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" - local APP="$2"; local IMAGE_TAG="$3" + declare APP="$2" IMAGE_TAG="$3" + local IMAGE + [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" verify_app_name "$APP" - local IMAGE="$(get_app_image_name "$APP" "$IMAGE_TAG")" + IMAGE="$(get_app_image_name "$APP" "$IMAGE_TAG")" verify_image "$IMAGE" || return 1 release_and_deploy "$APP" "$IMAGE_TAG" }