From 82352ff95cec4526bb3bea40a044335db490a990 Mon Sep 17 00:00:00 2001 From: Matthew MacLeod Date: Mon, 18 Nov 2024 15:26:37 +0000 Subject: [PATCH] cli/connhelper: bring remote binary environment evaluation out of dialer context --- cli/connhelper/connhelper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/connhelper/connhelper.go b/cli/connhelper/connhelper.go index e93bf5f61a5e..309320889fa0 100644 --- a/cli/connhelper/connhelper.go +++ b/cli/connhelper/connhelper.go @@ -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) }