Skip to content

Commit

Permalink
cli/connhelper: raise remote binary evaluation out of dialer context
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew MacLeod <[email protected]>
  • Loading branch information
mattmacleod committed Nov 28, 2024
1 parent bf04ac8 commit 37d2fb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/connhelper/connhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ func getConnectionHelper(daemonURL string, sshFlags []string) (*ConnectionHelper
}
sshFlags = addSSHTimeout(sshFlags)
sshFlags = disablePseudoTerminalAllocation(sshFlags)
remoteDockerBinary := dockerSSHRemoteBinary()
return &ConnectionHelper{
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
args := []string{dockerSSHRemoteBinary()}
args := []string{remoteDockerBinary}
if sp.Path != "" {
args = append(args, "--host", "unix://"+sp.Path)
}
Expand Down

0 comments on commit 37d2fb6

Please sign in to comment.