From 6d1d2235c342002989d050c0289a7290d16584e2 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 7 Apr 2020 17:00:49 +0200 Subject: [PATCH] Add missing app check --- functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/functions b/functions index e29e7f5..793526a 100755 --- a/functions +++ b/functions @@ -14,9 +14,15 @@ dokku-ansible-deploy-vault-pass-cmd() { #shellcheck disable=SC2034 declare desc="add new app vault password for decryption of passwords" - local app="$1" local vault_file="$DOKKU_LIB_ROOT/data/deploy.d/$app/.vault-password.sh" + local app="$2" + + if [[ -n "$app" ]]; then + dokku_col_log_info1_quiet "missing application name, try 'dokku ansible-deploy:vault-pass myappname'" + exit 1 + fi + if [[ -f $vault_file ]]; then dokku_col_log_info1_quiet "Vault password already in place" exit 0