Files
Jose Diaz-Gonzalez dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00

21 lines
712 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
cmd-docker-options-remove() {
declare desc="Remove a docker option from application"
declare cmd="docker-options:remove"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
verify_app_name "$APP"
read -ra passed_phases <<<"$(get_phases "$2")"
shift 2 # everything else passed is the docker option
[[ -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[@]}"
}
cmd-docker-options-remove "$@"