Merge pull request #4871 from dokku/4870-fix-procfile-remove

Do not error when default Procfile path does not exist when using a custom procfile-path
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2021-10-17 15:10:49 -04:00
commit f6b03dd55f
1 file changed
+4 -1
+4 -1
View File
@@ -40,9 +40,12 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
return nil return nil
} }
if err := os.Remove(path.Join(sourceWorkDir, "Procfile")); err != nil { defaultProcfilePath := path.Join(sourceWorkDir, "Procfile")
if common.FileExists(defaultProcfilePath) {
if err := os.Remove(defaultProcfilePath); err != nil {
return fmt.Errorf("Unable to remove existing Procfile: %v", err.Error()) return fmt.Errorf("Unable to remove existing Procfile: %v", err.Error())
} }
}
fullProcfilePath := path.Join(sourceWorkDir, procfilePath) fullProcfilePath := path.Join(sourceWorkDir, procfilePath)
if !common.FileExists(fullProcfilePath) { if !common.FileExists(fullProcfilePath) {