Skip to content

Commit f90440e

Browse files
authored
fix: allow to override config with env variables (gabrie30#190)
1 parent 0190357 commit f90440e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ func init() {
198198
rootCmd.PersistentFlags().StringVar(&config, "config", "", "GHORG_CONFIG - manually set the path to your config file")
199199

200200
viper.SetDefault("config", configs.DefaultConfFile())
201+
viper.AutomaticEnv()
201202

202203
_ = viper.BindPFlag("color", rootCmd.PersistentFlags().Lookup("color"))
203204
_ = viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))

0 commit comments

Comments
 (0)