fix: respect quoting in procfile commands

Procfile commands for the `docker-local` scheduler were split differently on deploy and on `dokku run`. Deploys failed on escaped quotes, and `dokku run` ignored quotes entirely. Both now split commands using shell quoting rules, and commands containing bare shell operators fail with a clear error, matching the `k3s` scheduler.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-09-24 01:24:27 -04:00
1 parent 92afa386d1
commit 1f8a814047
13 files changed
+317 -92

No files matched your search

@@ -65,12 +65,15 @@ main() {
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH" "$DOKKU_PORT")
DOCKER_ARGS+=" $IMAGE"
DOCKER_ARGS+=" $START_CMD"
fn-split-command "$START_CMD" >/dev/null
declare -a ARG_ARRAY=()
while IFS= read -r -d '' arg; do
ARG_ARRAY+=("$arg")
done < <(fn-docker-args-split "$DOCKER_ARGS")
while IFS= read -r -d '' arg; do
ARG_ARRAY+=("$arg")
done < <(fn-split-command "$START_CMD")
cid=$(fn-scheduler-docker-local-start-app-container "$APP" "${ARG_ARRAY[@]}")
plugn trigger post-container-create "app" "$cid" "$APP" "deploy" "$PROC_TYPE"