From 231e562b8da3612eed004d3e9fb9e612d7990f89 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 25 Nov 2022 13:44:25 -0500 Subject: [PATCH] fix: respect the .missing file and the process-specific procfile when fetching the a procfile command --- plugins/ps/triggers.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/ps/triggers.go b/plugins/ps/triggers.go index 5def5f1b6..1fd5cf03d 100644 --- a/plugins/ps/triggers.go +++ b/plugins/ps/triggers.go @@ -251,8 +251,13 @@ func TriggerPreDeploy(appName string, imageTag string) error { // TriggerProcfileGetCommand fetches a command from the procfile func TriggerProcfileGetCommand(appName string, processType string, port int) error { - procfilePath := getProcfilePath(appName) - command, err := getProcfileCommand(procfilePath, processType, port) + existingProcfile := getProcfilePath(appName) + processSpecificProcfile := fmt.Sprintf("%s.%s", existingProcfile, os.Getenv("DOKKU_PID")) + if common.FileExists(fmt.Sprintf("%s.missing", processSpecificProcfile)) { + return nil + } + + command, err := getProcfileCommand(getProcessSpecificProcfile(appName), processType, port) if err != nil { return err }