fix: do not call procfile-get-command if there is no command specified
This commit is contained in:
1 parent
63d7d28036
commit
53f7c89e46
1 file changed
+3
-1
@@ -67,13 +67,15 @@ trigger-scheduler-docker-local-scheduler-run() {
|
|||||||
[[ "$IMAGE_SOURCE_TYPE" == "herokuish" ]] && local EXEC_CMD="/exec"
|
[[ "$IMAGE_SOURCE_TYPE" == "herokuish" ]] && local EXEC_CMD="/exec"
|
||||||
is_image_cnb_based "$IMAGE" && EXEC_CMD=""
|
is_image_cnb_based "$IMAGE" && EXEC_CMD=""
|
||||||
|
|
||||||
POTENTIAL_PROCFILE_KEY="$1"
|
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 '')
|
PROC_CMD=$(plugn trigger procfile-get-command "$APP" "$POTENTIAL_PROCFILE_KEY" "5000" 2>/dev/null || echo '')
|
||||||
|
|
||||||
if [[ -n "$PROC_CMD" ]]; then
|
if [[ -n "$PROC_CMD" ]]; then
|
||||||
dokku_log_info1_quiet "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
|
dokku_log_info1_quiet "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
|
||||||
set -- "$PROC_CMD" "${@:2}"
|
set -- "$PROC_CMD" "${@:2}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2124
|
# shellcheck disable=SC2124
|
||||||
DOCKER_ARGS+=" --label=com.dokku.container-type=$PROCESS_TYPE"
|
DOCKER_ARGS+=" --label=com.dokku.container-type=$PROCESS_TYPE"
|
||||||
|
|||||||
Reference in new issue
Block a user