refactor: simplify ps:scale setup

This commit is contained in:
Jose Diaz-Gonzalez
2020-11-23 00:11:10 -05:00
parent 97513dee91
commit bf17023639

View File

@@ -158,15 +158,11 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error
} }
} }
if !hasScaleFile(appName) { if !hasScaleFile(appName) || common.FileExists(procfilePath) {
err := common.SuppressOutput(func() error { update := func() error {
return updateScalefile(appName, make(map[string]int)) return updateScalefile(appName, make(map[string]int))
})
if err != nil {
return err
} }
} else if common.FileExists(procfilePath) { if err := common.SuppressOutput(update); err != nil {
if err := updateScalefile(appName, make(map[string]int)); err != nil {
return err return err
} }
} }