Skip to content

Commit

Permalink
Merge pull request docker#5345 from thaJeztah/connhelper_cleanups
Browse files Browse the repository at this point in the history
cli/connhelper: getConnectionHelper: move ssh-option funcs out of closure
  • Loading branch information
thaJeztah authored Aug 13, 2024
2 parents 1a7b7dd + 0fd3fb0 commit 35666cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/connhelper/connhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ func getConnectionHelper(daemonURL string, sshFlags []string) (*ConnectionHelper
if err != nil {
return nil, errors.Wrap(err, "ssh host connection is not valid")
}
sshFlags = addSSHTimeout(sshFlags)
sshFlags = disablePseudoTerminalAllocation(sshFlags)
return &ConnectionHelper{
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
args := []string{"docker"}
if sp.Path != "" {
args = append(args, "--host", "unix://"+sp.Path)
}
sshFlags = addSSHTimeout(sshFlags)
sshFlags = disablePseudoTerminalAllocation(sshFlags)
args = append(args, "system", "dial-stdio")
return commandconn.New(ctx, "ssh", append(sshFlags, sp.Args(args...)...)...)
},
Expand Down

0 comments on commit 35666cf

Please sign in to comment.