Skip to content

Commit

Permalink
Don't check for cfg.ProxyCommand != nil but for empty slice
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Graetz <[email protected]>
  • Loading branch information
fg91 committed Oct 13, 2023
1 parent 68c055b commit 25c2258
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flyteidl/clients/go/admin/auth_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func setHTTPClientContext(ctx context.Context, cfg *Config, proxyCredentialsFutu
transport.Proxy = http.ProxyURL(&cfg.HTTPProxyURL.URL)
}

if cfg.ProxyCommand != nil {
if len(cfg.ProxyCommand) > 0 {
httpClient.Transport = &proxyAuthTransport{
transport: transport,
proxyCredentialsFuture: proxyCredentialsFuture,
Expand Down
2 changes: 1 addition & 1 deletion flyteidl/clients/go/admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func NewAdminConnection(ctx context.Context, cfg *Config, proxyCredentialsFuture

opts = append(opts, GetAdditionalAdminClientConfigOptions(cfg)...)

if cfg.ProxyCommand != nil {
if len(cfg.ProxyCommand) > 0 {
opts = append(opts, grpc.WithChainUnaryInterceptor(NewProxyAuthInterceptor(cfg, proxyCredentialsFuture)))
opts = append(opts, grpc.WithPerRPCCredentials(proxyCredentialsFuture))
}
Expand Down

0 comments on commit 25c2258

Please sign in to comment.