Skip to content

Commit 2871b07

Browse files
committed
fix: Fix backward compatibility of environment variables with bool type
Signed-off-by: Jiwon Park <[email protected]>
1 parent 5e5035d commit 2871b07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func envBoolOrError(def bool, key string, alts ...string) (bool, error) {
131131
return parse(val)
132132
}
133133
for _, alt := range alts {
134-
if val := os.Getenv(key); val != "" {
134+
if val := os.Getenv(alt); val != "" {
135135
fmt.Fprintf(os.Stderr, "env %s has been deprecated, use %s instead\n", alt, key)
136136
return parse(val)
137137
}

0 commit comments

Comments
 (0)