Skip to content

Commit

Permalink
#246: Create new value for services before merging default values in …
Browse files Browse the repository at this point in the history
…place (#247)

Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
  • Loading branch information
fubarhouse committed Aug 25, 2020
1 parent 6b5c1fa commit 5477a08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/library/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ func ImportDefaults(c *Config, service string, importer model.Service) bool {
// If configuration has a value for the defaults label
if val, ok := container.Config.Labels["pygmy.defaults"]; ok {
if val == "1" || val == "true" {
// Clear destination Service to a new nil value.
c.Services[service] = model.Service{}
// Import the provided Service to the map entry.
c.Services[service] = getService(importer, c.Services[service])
// This is now successful, so return true.
return true
}
}
Expand Down

0 comments on commit 5477a08

Please sign in to comment.