Skip to content

Commit

Permalink
do not override app.Config.Processes in GetProcessConfigs()
Browse files Browse the repository at this point in the history
updating it was breaking other assumptions that an empty Processes means they were not set in fly.toml
  • Loading branch information
tvdfly authored and dangra committed Jan 25, 2023
1 parent 24236b2 commit 28a4f23
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,17 @@ type ProcessConfig struct {
func (c *Config) GetProcessConfigs(appLaunching bool) (map[string]ProcessConfig, error) {
res := make(map[string]ProcessConfig)
processCount := len(c.Processes)
configProcesses := make(map[string]string)
if processCount == 0 {
c.Processes = map[string]string{"": ""}
configProcesses[""] = ""
} else {
for k, v := range c.Processes {
configProcesses[k] = v
}
}
defaultProcessName := lo.Keys(c.Processes)[0]
defaultProcessName := lo.Keys(configProcesses)[0]

for processName, cmdStr := range c.Processes {
for processName, cmdStr := range configProcesses {
cmd := make([]string, 0)
if cmdStr != "" {
cmd = shlex.Split(cmdStr, " ")
Expand Down

0 comments on commit 28a4f23

Please sign in to comment.