fix: do not call procfile-get-command if there is no command specified
This commit is contained in:
@@ -67,12 +67,14 @@ trigger-scheduler-docker-local-scheduler-run() {
|
||||
[[ "$IMAGE_SOURCE_TYPE" == "herokuish" ]] && local EXEC_CMD="/exec"
|
||||
is_image_cnb_based "$IMAGE" && EXEC_CMD=""
|
||||
|
||||
POTENTIAL_PROCFILE_KEY="$1"
|
||||
PROC_CMD=$(plugn trigger procfile-get-command "$APP" "$POTENTIAL_PROCFILE_KEY" "5000" 2>/dev/null || echo '')
|
||||
local POTENTIAL_PROCFILE_KEY="$1"
|
||||
if [[ -n "$POTENTIAL_PROCFILE_KEY" ]]; then
|
||||
PROC_CMD=$(plugn trigger procfile-get-command "$APP" "$POTENTIAL_PROCFILE_KEY" "5000" 2>/dev/null || echo '')
|
||||
|
||||
if [[ -n "$PROC_CMD" ]]; then
|
||||
dokku_log_info1_quiet "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
|
||||
set -- "$PROC_CMD" "${@:2}"
|
||||
if [[ -n "$PROC_CMD" ]]; then
|
||||
dokku_log_info1_quiet "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
|
||||
set -- "$PROC_CMD" "${@:2}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2124
|
||||
|
||||
Reference in New Issue
Block a user