Skip to content

Commit

Permalink
allowing empty values for env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pdk27 committed May 13, 2020
1 parent d3d9b0b commit 97461c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/config/config.go
Expand Up @@ -111,6 +111,7 @@ func LoadConfigForRoot(configFileFlagName string, cmdDefaults map[string]interfa

// set up env
viper.AutomaticEnv()
viper.AllowEmptyEnv(true) // empty strings are perfectly valid values for our usecases
viper.SetEnvPrefix("aemm") // AEMM stands for amazon-ec2-metadata-mock, set prefix to avoid name clashes
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_"))

Expand Down

0 comments on commit 97461c7

Please sign in to comment.