Skip to content

Commit

Permalink
pkg/flags: fatal on conflicting environment variable
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Mar 2, 2018
1 parent 0a972da commit 111b62a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/flags/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ func verifyEnv(prefix string, usedEnvKey, alreadySet map[string]bool) {
continue
}
if alreadySet[kv[0]] {
// TODO: exit with error in v3.4
plog.Warningf("recognized environment variable %s, but unused: shadowed by corresponding flag", kv[0])
continue
plog.Fatalf("conflicting environment variable %q is shadowed by corresponding command-line flag (either unset environment variable or disable flag)", kv[0])
}
if strings.HasPrefix(env, prefix+"_") {
plog.Warningf("unrecognized environment variable %s", env)
Expand Down

0 comments on commit 111b62a

Please # to comment.