Skip to content

Commit

Permalink
default to first path
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsdev0 committed Jul 8, 2024
1 parent 2a10ff8 commit b52239a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ func initConfig() {
configPaths = append(configPaths, defaultPath)
if err := readViperConfig(configPaths); err != nil {
viper.SafeWriteConfigAs(defaultPath)
viper.ReadInConfig()
viper.SetConfigFile(defaultPath)
err = viper.ReadInConfig()
cobra.CheckErr(err)
}
}
Expand Down

0 comments on commit b52239a

Please sign in to comment.