Merge pull request #798 from phil-park/master

fix: Fix backward compatibility of environment variables with bool type
This commit is contained in:
Kubernetes Prow Robot 2023-08-31 16:06:30 -07:00 committed by GitHub
commit e0016481f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ func envBoolOrError(def bool, key string, alts ...string) (bool, error) {
return parse(val)
}
for _, alt := range alts {
if val := os.Getenv(key); val != "" {
if val := os.Getenv(alt); val != "" {
fmt.Fprintf(os.Stderr, "env %s has been deprecated, use %s instead\n", alt, key)
return parse(val)
}