fix: respect the .missing file and the process-specific procfile when fetching the a procfile command

This commit is contained in:
Jose Diaz-Gonzalez
2022-11-25 13:44:25 -05:00
parent 1455390dd3
commit 231e562b8d

View File

@@ -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
}