Skip to content

Commit

Permalink
No need to delete services because newService is nil if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra committed Apr 10, 2023
1 parent f2ae639 commit c484058
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/appconfig/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,7 @@ func patchServices(cfg map[string]any) (map[string]any, error) {
newServices = append(newServices, service)
}
}

if len(services) > 0 {
cfg["services"] = newServices
} else {
delete(cfg, "services")
}
cfg["services"] = newServices
}
return cfg, nil
}
Expand Down

0 comments on commit c484058

Please sign in to comment.