Skip to content

Commit 3faa95e

Browse files
committed
Revert "cli/command: cli.initializeFromClient() use client's config for host"
This reverts commit 459c564. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent f17c2e5 commit 3faa95e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cli/command/cli.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func (cli *DockerCli) getInitTimeout() time.Duration {
331331

332332
func (cli *DockerCli) initializeFromClient() {
333333
ctx := context.Background()
334-
if !strings.HasPrefix(cli.client.DaemonHost(), "ssh://") {
334+
if !strings.HasPrefix(cli.DockerEndpoint().Host, "ssh://") {
335335
// @FIXME context.WithTimeout doesn't work with connhelper / ssh connections
336336
// time="2020-04-10T10:16:26Z" level=warning msg="commandConn.CloseWrite: commandconn: failed to wait: signal: killed"
337337
var cancel func()
@@ -374,9 +374,7 @@ func (cli *DockerCli) CurrentContext() string {
374374
return resolveContextName(cli.options, cli.configFile)
375375
}
376376

377-
// DockerEndpoint returns the current docker endpoint.
378-
//
379-
// TODO(thaJeztah): deprecate this in favor or cli.Client().Host? (unless someone needs the TLSConfig).
377+
// DockerEndpoint returns the current docker endpoint
380378
func (cli *DockerCli) DockerEndpoint() docker.Endpoint {
381379
if err := cli.initialize(); err != nil {
382380
// Note that we're not terminating here, as this function may be used

0 commit comments

Comments
 (0)