diff --git a/plugins/ps/functions.go b/plugins/ps/functions.go index 3a1b6abd9..e62a4064d 100644 --- a/plugins/ps/functions.go +++ b/plugins/ps/functions.go @@ -381,10 +381,6 @@ func scaleReport(appName string) error { } func scaleSet(appName string, skipDeploy bool, processTuples []string) error { - if !canScaleApp(appName) { - return fmt.Errorf("App %s contains DOKKU_SCALE file and cannot be manually scaled", appName) - } - scale, err := parseProcessTuples(processTuples) if err != nil { return err diff --git a/plugins/ps/subcommands.go b/plugins/ps/subcommands.go index 9c675f872..ed15efcf7 100644 --- a/plugins/ps/subcommands.go +++ b/plugins/ps/subcommands.go @@ -134,6 +134,10 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error return scaleReport(appName) } + if !canScaleApp(appName) { + return fmt.Errorf("App %s contains DOKKU_SCALE file and cannot be manually scaled", appName) + } + return scaleSet(appName, skipDeploy, processTuples) }