fix: delete existing Procfile if the user tried to overwrite it with a non-existing one
This behavior follows what is described in the documentation.
This commit is contained in:
1 parent
d9af6516bb
commit
21bb5ea2ed
1 file changed
+5
@@ -80,6 +80,11 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
|
||||
if appSourceImage == "" {
|
||||
repoProcfilePath := path.Join(sourceWorkDir, procfilePath)
|
||||
if !common.FileExists(repoProcfilePath) {
|
||||
if procfilePath != "Procfile" && common.FileExists(repoDefaultProcfilePath) {
|
||||
if err := os.Remove(repoDefaultProcfilePath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return common.TouchFile(fmt.Sprintf("%s.missing", processSpecificProcfile))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user