Skip to content

Commit

Permalink
fix(settings) Do not crash if a project just use the legacy zone conf…
Browse files Browse the repository at this point in the history
…iguration
  • Loading branch information
john-scalingo committed Mar 15, 2022
1 parent 0e94c9a commit ff7d7ec
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 ff7d7ec

Please sign in to comment.