Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fix: add env var override field to deployconfig
  • Loading branch information
deansheather committed Jan 5, 2023
commit f3d5166935af8b05080f72b777b994a802a3f96b
5 changes: 4 additions & 1 deletion cli/deployment/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ func readSliceFromViper[T any](vip *viper.Viper, key string, value any) []T {

// Ensure the env entry for this key is registered
// before checking value.
//
// We don't support DeploymentConfigField[].EnvOverride for array flags so
// this is fine to just use `formatEnv` here.
vip.MustBindEnv(configKey, formatEnv(configKey))

value := vip.Get(configKey)
Expand Down Expand Up @@ -709,7 +712,7 @@ func setFlags(prefix string, flagset *pflag.FlagSet, vip *viper.Viper, target in

// Allow currently set environment variables
// to override default values in help output.
vip.MustBindEnv(prefix, formatEnv(prefix))
vip.MustBindEnv(prefix, env)

switch value.(type) {
case string:
Expand Down