Skip to content

Commit

Permalink
Merge pull request #10 from jzelinskie/allowempty
Browse files Browse the repository at this point in the history
allow for empty env vars
  • Loading branch information
jzelinskie committed Apr 18, 2022
2 parents ec5ba7d + 7489441 commit 33f7632
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cobrautil.go
Expand Up @@ -33,6 +33,7 @@ func SyncViperPreRunE(prefix string) CobraRunFunc {
}

v := viper.New()
v.AllowEmptyEnv(true)
viper.SetEnvPrefix(prefix)

cmd.Flags().VisitAll(func(f *pflag.Flag) {
Expand Down

0 comments on commit 33f7632

Please sign in to comment.