Skip to content

Commit

Permalink
feat: fallback to global when no config is found
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jan 7, 2024
1 parent a61c1d2 commit 8919342
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/core/ini.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func loadINI(cfg *Config, dry bool) (*ini.File, error) {

uCfg := ini.Empty(ini.LoadOptions{
AllowShadows: true,
Loose: true,
SpaceBeforeInlineComment: true,
})

Expand Down Expand Up @@ -254,6 +255,8 @@ func loadINI(cfg *Config, dry bool) (*ini.File, error) {
}
cfg.Flags.Local = true
sources = append(sources, []string{defaultCfg, cfg.Root}...)
} else if base == "" {
return nil, NewE100("loadINI", errors.New("no config file found"))
}

uCfg.BlockMode = false
Expand Down

0 comments on commit 8919342

Please sign in to comment.