From 661d4ebe5f5c58858cefefed3d47b215606ae650 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Tue, 21 Mar 2023 11:05:18 -0500 Subject: [PATCH] fix: allow `~` to work when resolving `remote.SSH.configFile` on Windows This was causing a Windows user troubles! --- src/remote.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/remote.ts b/src/remote.ts index 76a534d9..cf47f965 100644 --- a/src/remote.ts +++ b/src/remote.ts @@ -444,6 +444,12 @@ export class Remote { if (!sshConfigFile) { sshConfigFile = path.join(os.homedir(), ".ssh", "config") } + // VS Code Remote resolves ~ to the home directory. + // This is required for the tilde to work on Windows. + if (sshConfigFile.startsWith("~")) { + sshConfigFile = path.join(os.homedir(), sshConfigFile.slice(1)) + } + const sshConfig = new SSHConfig(sshConfigFile) await sshConfig.load() 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