mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
Merge pull request #6450 from dokku/disable-flag-parsing
Always set -- on docker run commands internally to avoid parsing flags on specified commands
This commit is contained in:
@@ -42,7 +42,7 @@ func (t TemplateCommand) CronCommand() string {
|
||||
return t.AltCommand
|
||||
}
|
||||
|
||||
return fmt.Sprintf("dokku run --cron-id %s %s %s", t.ID, t.App, t.Command)
|
||||
return fmt.Sprintf("dokku run --cron-id %s %s -- %s", t.ID, t.App, t.Command)
|
||||
}
|
||||
|
||||
func FetchCronEntries(appName string) ([]TemplateCommand, error) {
|
||||
|
||||
@@ -109,7 +109,7 @@ func CommandRun(appName string, cronID string, detached bool) error {
|
||||
os.Setenv("DOKKU_CRON_ID", cronID)
|
||||
os.Setenv("DOKKU_RM_CONTAINER", "1")
|
||||
scheduler := common.GetAppScheduler(appName)
|
||||
args := append([]string{scheduler, appName, "0"}, fields...)
|
||||
args := append([]string{scheduler, appName, "0", "--"}, fields...)
|
||||
return common.PlugnTrigger("scheduler-run", args...)
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ fn-run() {
|
||||
verify_app_name "$APP"
|
||||
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
DOKKU_CRON_ID="$CRON_ID" plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "${#RUN_ENV[@]}" "${RUN_ENV[@]}" "$@"
|
||||
DOKKU_CRON_ID="$CRON_ID" plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "${#RUN_ENV[@]}" "${RUN_ENV[@]}" -- "$@"
|
||||
}
|
||||
|
||||
cmd-run() {
|
||||
|
||||
@@ -73,6 +73,10 @@ trigger-scheduler-docker-local-scheduler-run() {
|
||||
[[ "$IMAGE_SOURCE_TYPE" == "herokuish" ]] && local EXEC_CMD="/exec"
|
||||
is_image_cnb_based "$IMAGE" && EXEC_CMD=""
|
||||
|
||||
if [[ "$1" == "--" ]]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
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 '')
|
||||
|
||||
Reference in New Issue
Block a user