fix: handle case where deploying app image does not exist
This happens if ps:scale is called before a deploy. Also refactor GetDeployingAppImageName() to return an error as the second return parameter.
This commit is contained in:
@@ -145,7 +145,11 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error
|
||||
procfilePath := getProcfilePath(appName)
|
||||
if !common.FileExists(procfilePath) {
|
||||
extract := func() error {
|
||||
image := common.GetDeployingAppImageName(appName, "", "")
|
||||
image, err := common.GetDeployingAppImageName(appName, "", "")
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return extractProcfile(appName, image)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user