Skip to content

Commit 0419db6

Browse files
committed
fix creds
Signed-off-by: alanprot <alanprot@gmail.com>
1 parent a1e9a67 commit 0419db6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/clientconfig/http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ func NewRoundTripperFromConfig(cfg config_util.HTTPClientConfig, transportConfig
176176

177177
if cfg.BasicAuth != nil {
178178
// TODO(yeya24): expose UsernameFile as a config.
179-
if len(cfg.BasicAuth.PasswordFile) >= 0 {
179+
if len(cfg.BasicAuth.PasswordFile) > 0 {
180180
rt = config_util.NewBasicAuthRoundTripper(config_util.NewInlineSecret(cfg.BasicAuth.Username), config_util.NewInlineSecret(cfg.BasicAuth.PasswordFile), rt)
181-
} else if len(cfg.BasicAuth.Password) >= 0 {
181+
} else if len(cfg.BasicAuth.Password) > 0 {
182182
rt = config_util.NewBasicAuthRoundTripper(config_util.NewInlineSecret(cfg.BasicAuth.Username), config_util.NewInlineSecret(string(cfg.BasicAuth.Password)), rt)
183183
}
184184
}

0 commit comments

Comments
 (0)