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:
@@ -80,6 +80,11 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
|
|||||||
if appSourceImage == "" {
|
if appSourceImage == "" {
|
||||||
repoProcfilePath := path.Join(sourceWorkDir, procfilePath)
|
repoProcfilePath := path.Join(sourceWorkDir, procfilePath)
|
||||||
if !common.FileExists(repoProcfilePath) {
|
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))
|
return common.TouchFile(fmt.Sprintf("%s.missing", processSpecificProcfile))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user