From 5a0078c7b328f2f6534140570a4142d49bc3d752 Mon Sep 17 00:00:00 2001 From: Levi Yan Date: Mon, 24 Mar 2025 23:00:40 +0800 Subject: [PATCH] fix: cannot connect devcontainer by sshkey --- src/remote-container.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/remote-container.ts b/src/remote-container.ts index 20b85ad..8a7feaa 100644 --- a/src/remote-container.ts +++ b/src/remote-container.ts @@ -16,9 +16,9 @@ export default class RemoteContainer { } async firstOpenProject(host: string, port: number, username: string, path: string) { - this.firstConnect(host, username, port) + await this.firstConnect(host, username, port) .then((res) => { - if (res == 'success') { + if (res === 'success') { // only success then open folder this.openRemoteFolder(host, port, username, path); } @@ -148,7 +148,7 @@ export default class RemoteContainer { openRemoteFolder(host: string, port: number, username: string, path: string): void { - // var host = `${host}-${port}` + var host = `${host}-${port}` const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window` let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`); terminal.show(true);