Skip to content

Commit

Permalink
chore: simplify error when docker context is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Oct 14, 2024
1 parent b31da78 commit a38a345
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/core/docker_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func GetDockerHostFromCurrentContext() (string, error) {
}
}

return "", errors.New("no Docker host found in the current context")
return "", ErrDockerSocketNotSetInDockerContext
}

// currentContext returns the current context name, based on
Expand Down
2 changes: 1 addition & 1 deletion internal/core/docker_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func dockerHostFromDockerContext(ctx context.Context) (string, error) {
return dockerHost, nil
}

return "", errors.Join(ErrDockerSocketNotSetInDockerContext, err)
return "", err
}

// dockerHostFromProperties returns the docker host from the ~/.testcontainers.properties file, if it's not empty
Expand Down

0 comments on commit a38a345

Please sign in to comment.