Skip to content

Commit

Permalink
Merge pull request #24 from Scalingo/fix/settings/empty_zones
Browse files Browse the repository at this point in the history
fix(settings) Do not crash if a project just use the legacy zone configuration
  • Loading branch information
Soulou authored Mar 15, 2022
2 parents 0e94c9a + ff7d7ec commit b4df402
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func init() {
os.Exit(1)
}

if settings.Zones == nil {
settings.Zones = make(map[string]ZoneSettings)
}

if len(settings.Hosts.Zone) > 0 {
settings.Zones["default"] = ZoneSettings{
Name: settings.Hosts.Zone,
Expand Down

0 comments on commit b4df402

Please sign in to comment.