Gracefully check for docker config · jesseduffield/lazydocker@e860416 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit e860416
Gracefully check for docker config
It's fine if the file doesn't exist
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -338,11 +338,7 @@ func determineDockerHost() (string, error) { | ||
338 | 338 | |
339 | 339 | currentContext := os.Getenv("DOCKER_CONTEXT") |
340 | 340 | if currentContext == "" { |
341 | -dockerConfigDir := cliconfig.Dir() | |
342 | -if _, err := os.Stat(dockerConfigDir); err != nil { | |
343 | -return "", err | |
344 | - } | |
345 | -cf, err := cliconfig.Load(dockerConfigDir) | |
341 | +cf, err := cliconfig.Load(cliconfig.Dir()) | |
346 | 342 | if err != nil { |
347 | 343 | return "", err |
348 | 344 | } |