From f4c995fb26b8a8e51f4f9b535e3a3998f2c7b4f7 Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Sat, 16 Mar 2019 16:57:04 +0100 Subject: [PATCH] Fix password/passphrase being prompted multiple times --- src/manager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/manager.ts b/src/manager.ts index 48a35ce..7472988 100644 --- a/src/manager.ts +++ b/src/manager.ts @@ -103,10 +103,11 @@ export class Manager implements vscode.FileSystemProvider, vscode.TreeDataProvid if (promise) return promise; config = config || (await loadConfigs()).find(c => c.name === name); promise = catchingPromise(async (resolve, reject) => { + const { createSSH, getSFTP, calculateActualConfig } = await import('./connect'); + config = config && await calculateActualConfig(config) || undefined; if (!config) { throw new Error(`A SSH filesystem with the name '${name}' doesn't exist`); } - const { createSSH, getSFTP } = await import('./connect'); const client = await createSSH(config); if (!client) return reject(null); let root = config!.root || '/';