Skip to content

Commit e4acc9b

Browse files
feat: allow specifying SSH config path via a daemon environment variable (#4)
Relates to coder/internal#590 I've tested this manually, and within Coder Desktop macOS, by setting `MUTAGEN_SSH_CONFIG_PATH` to `none`. From the man page for `ssh(1)`: ``` -F configfile [...] If set to “none”, no configuration files will be read. ``` Subsequent PRs for the Desktop apps will use the new Mutagen version (0.18.3), and specify `MUTAGEN_SSH_CONFIG_PATH=none`
1 parent cf79993 commit e4acc9b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pkg/agent/transport/ssh/transport.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func (t *sshTransport) Command(command string) (*exec.Cmd, error) {
156156
// more efficient to compress at that layer, even with the slower Go
157157
// implementation.
158158
var sshArguments []string
159+
if configPath := os.Getenv("MUTAGEN_SSH_CONFIG_PATH"); configPath != "" {
160+
// According to `man ssh`, "none" is also a valid value for `-F`
161+
sshArguments = append(sshArguments, "-F", configPath)
162+
}
159163
sshArguments = append(sshArguments, ssh.ConnectTimeoutFlag(connectTimeoutSeconds))
160164
sshArguments = append(sshArguments, ssh.ServerAliveFlags(serverAliveIntervalSeconds, serverAliveCountMax)...)
161165
if t.port != 0 {

pkg/mutagen/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const (
1515
// VersionMinor represents the current minor version of Mutagen.
1616
VersionMinor = 18
1717
// VersionPatch represents the current patch version of Mutagen.
18-
VersionPatch = 2
18+
VersionPatch = 3
1919
// VersionTag represents a tag to be appended to the Mutagen version string.
2020
// It must not contain spaces. If empty, no tag is appended to the version
2121
// string.

pkg/process/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
// windowsPowershellCommandNotFoundFragment is a fragment of the error output
2424
// returned on Windows systems running Powershell when a command cannot be
2525
// found.
26-
// Different Windows versions use slightly error messages.
26+
// Different Windows versions use slightly different error messages.
2727
// i.e. "is not recognized as the name of a cmdlet, function, script file, or operable program."
2828
// "is not recognized as a name of a cmdlet, function, script file, or executable program."
2929
windowsPowershellCommandNotFoundFragment = "cmdlet, function, script file, or"

0 commit comments

Comments
 (0)