fix lazydocker breaking when having default docker explicitly mention… · jesseduffield/lazydocker@f6c044d (original) (raw)

Original file line number Diff line number Diff line change
@@ -345,7 +345,8 @@ func determineDockerHost() (string, error) {
345 345 currentContext = cf.CurrentContext
346 346 }
347 347
348 -if currentContext == "" {
348 +// On some systems (windows) `default` is stored in the docker config as the currentContext.
349 +if currentContext == "" |
349 350 // If a docker context is neither specified via the "DOCKER_CONTEXT" environment variable nor via the
350 351 // $HOME/.docker/config file, then we fall back to connecting to the "default docker host" meant for
351 352 // the host operating system.