Skip to content

Commit

Permalink
core: respect "~" in ssh config (#849)
Browse files Browse the repository at this point in the history
abiosoft authored Nov 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f36ff1e commit 3c3af24
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -497,9 +497,14 @@ func generateSSHConfig(modifySSHConfig bool) error {
continue
}

if words[0] == "Include" && words[1] == sshFileColima {
// already present
return nil
if words[0] == "Include" {
sshConfig := words[1]
sshConfig = strings.Replace(sshConfig, "~/", "$HOME/", 1)
sshConfig = os.ExpandEnv(sshConfig)
if sshConfig == sshFileColima {
// already present
return nil
}
}
}

0 comments on commit 3c3af24

Please sign in to comment.