Skip to content

Commit e453183

Browse files
authored
fix: allow ~ to work when resolving remote.SSH.configFile on Windows (#68)
1 parent 8a47fc1 commit e453183

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/remote.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,12 @@ export class Remote {
444444
if (!sshConfigFile) {
445445
sshConfigFile = path.join(os.homedir(), ".ssh", "config")
446446
}
447+
// VS Code Remote resolves ~ to the home directory.
448+
// This is required for the tilde to work on Windows.
449+
if (sshConfigFile.startsWith("~")) {
450+
sshConfigFile = path.join(os.homedir(), sshConfigFile.slice(1))
451+
}
452+
447453
const sshConfig = new SSHConfig(sshConfigFile)
448454
await sshConfig.load()
449455

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy