Skip to content

Commit

Permalink
also treat DOCKER_CONTEXT='' as unset
Browse files Browse the repository at this point in the history
  • Loading branch information
nicks committed Jul 14, 2022
1 parent c5d33b9 commit 70fccc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ func resolveContextName(opts *cliflags.CommonOptions, config *configfile.ConfigF
if os.Getenv(client.EnvOverrideHost) != "" {
return DefaultContextName, nil
}
if ctxName, ok := os.LookupEnv("DOCKER_CONTEXT"); ok {
if ctxName := os.Getenv("DOCKER_CONTEXT"); ctxName != "" {
return ctxName, nil
}
if config != nil && config.CurrentContext != "" {
Expand Down

0 comments on commit 70fccc5

Please sign in to comment.