Skip to content

Commit c530d2f

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 5e36ccf commit c530d2f

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()
@@ -426,9 +426,7 @@ func resolveContextName(opts *cliflags.ClientOptions, config *configfile.ConfigF
426426
return DefaultContextName
427427
}
428428

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

0 commit comments

Comments
 (0)