Skip to content

Commit

Permalink
Gracefully check for docker config
Browse files Browse the repository at this point in the history
It's fine if the file doesn't exist
  • Loading branch information
jesseduffield committed Oct 12, 2023
1 parent cce9d40 commit e860416
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/commands/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,7 @@ func determineDockerHost() (string, error) {

currentContext := os.Getenv("DOCKER_CONTEXT")
if currentContext == "" {
dockerConfigDir := cliconfig.Dir()
if _, err := os.Stat(dockerConfigDir); err != nil {
return "", err
}
cf, err := cliconfig.Load(dockerConfigDir)
cf, err := cliconfig.Load(cliconfig.Dir())
if err != nil {
return "", err
}
Expand Down

0 comments on commit e860416

Please sign in to comment.