Skip to content

Commit

Permalink
Don't panic when no overrides (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmholmes authored Dec 18, 2023
1 parent 79280de commit adf068c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ func Import() error {
contextPath := fmt.Sprintf("contexts.%s", name)
ctx := viper.Sub(contextPath)
overrides := viper.Sub("overrides")
for key, value := range overrides.AllSettings() {
ctx.Set(key, value)
if overrides != nil {
for key, value := range overrides.AllSettings() {
ctx.Set(key, value)
}
}
err := Write()
return err
Expand Down

0 comments on commit adf068c

Please sign in to comment.