fix: correct issues in parsing and writing an updated app.json

This commit is contained in:
Jose Diaz-Gonzalez
2021-08-01 21:52:05 -04:00
parent 4967cc1d1c
commit 0decb386d5
2 changed files with 4 additions and 4 deletions

View File

@@ -561,13 +561,13 @@ func injectDokkuScale(appName string, image string) error {
} }
processType := procParts[0] processType := procParts[0]
procCount, err := strconv.Atoi(procParts[1]) quantity, err := strconv.Atoi(procParts[1])
if err != nil { if err != nil {
continue continue
} }
appJSON.Formation[processType] = Formation{ appJSON.Formation[processType] = Formation{
Quantity: procCount, Quantity: quantity,
} }
} }
@@ -576,5 +576,5 @@ func injectDokkuScale(appName string, image string) error {
return err return err
} }
return ioutil.WriteFile(dokkuScaleFile, b, 0644) return ioutil.WriteFile(GetAppjsonPath(appName), b, 0644)
} }

View File

@@ -85,7 +85,7 @@ func main() {
case "ps-set-scale": case "ps-set-scale":
appName := flag.Arg(0) appName := flag.Arg(0)
appName, args := common.ShiftString(flag.Args()) appName, args := common.ShiftString(flag.Args())
skipDeploy, processTuples := common.ShiftString(args) skipDeploy, args := common.ShiftString(args)
clearExisting, processTuples := common.ShiftString(args) clearExisting, processTuples := common.ShiftString(args)
err = ps.TriggerPsSetScale(appName, common.ToBool(skipDeploy), common.ToBool(clearExisting), processTuples) err = ps.TriggerPsSetScale(appName, common.ToBool(skipDeploy), common.ToBool(clearExisting), processTuples)
case "report": case "report":