refactor: move unimplemented command detection into config file

This commit is contained in:
Jose Diaz-Gonzalez
2018-04-24 00:27:17 -04:00
parent 84b62938da
commit 02b0c1c7f9
17 changed files with 44 additions and 22 deletions

View File

@@ -13,6 +13,7 @@ service-backup-cmd() {
declare desc="creates a backup of the $PLUGIN_SERVICE service to an existing s3 bucket"
local cmd="$PLUGIN_COMMAND_PREFIX:backup" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1" BUCKET_NAME="$2" USE_IAM_OPTIONAL_FLAG="$3"
is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented"
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service"
[[ -z "$BUCKET_NAME" ]] && dokku_log_fail "Please specify an aws bucket for the backup"