refactor: unify command declaration across codebase

This commit is contained in:
Jose Diaz-Gonzalez
2020-02-10 01:40:30 -05:00
parent b0abeb49dd
commit e67b96780d
108 changed files with 475 additions and 315 deletions

View File

@@ -6,11 +6,13 @@ source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
cmd-docker-options-remove() {
declare desc="Remove a docker option from application"
local cmd="docker-options:remove"
declare cmd="docker-options:remove"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
verify_app_name "$2" && local APP="$2"
read -ra passed_phases <<<"$(get_phases "$3")"
shift 3 # everything else passed is the docker option
verify_app_name "$APP"
read -ra passed_phases <<<"$(get_phases "$2")"
shift 2 # everything else passed is the docker option
# shellcheck disable=SC2154
[[ -z ${passed_docker_option="$@"} ]] && dokku_log_fail "Please specify docker options to remove from the phase"
remove_passed_docker_option passed_phases[@] "${passed_docker_option[@]}"