Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Jan 7, 2020
1 parent c350b3a commit b4ceaef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/visor/visor.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,11 @@ func (node *Node) updateAutoStartConfig(appName string, autoStart bool) error {

changed := false

for _, app := range config.Apps {
if app.App == appName {
app.AutoStart = autoStart
node.logger.Infof("Saving auto start = %v for app %v to config", autoStart, appName)

for i := range config.Apps {
if config.Apps[i].App == appName {
config.Apps[i].AutoStart = autoStart
changed = true
}
}
Expand Down Expand Up @@ -574,6 +576,8 @@ func (node *Node) writeConfig(config *Config) error {

configPath := *node.confPath

node.logger.Infof("Updating visor config to %+v", config)

bytes, err := json.Marshal(config)
if err != nil {
return err
Expand Down

0 comments on commit b4ceaef

Please sign in to comment.