Skip to content

Commit 43dd6ea

Browse files
committed
cli/connhelper: raise remote binary evaluation out of dialer context
Signed-off-by: Matthew MacLeod <[email protected]>
1 parent 43dbdcf commit 43dd6ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli/connhelper/connhelper.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ func getConnectionHelper(daemonURL string, sshFlags []string) (*ConnectionHelper
5454
}
5555
sshFlags = addSSHTimeout(sshFlags)
5656
sshFlags = disablePseudoTerminalAllocation(sshFlags)
57+
remoteDockerBinary := dockerSSHRemoteBinary()
5758
return &ConnectionHelper{
5859
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
59-
args := []string{dockerSSHRemoteBinary()}
60+
args := []string{remoteDockerBinary}
6061
if sp.Path != "" {
6162
args = append(args, "--host", "unix://"+sp.Path)
6263
}

0 commit comments

Comments
 (0)