diff --git a/src/home.ts b/src/home.ts index 9fbe648..7fcc704 100644 --- a/src/home.ts +++ b/src/home.ts @@ -68,12 +68,12 @@ export default class DSHome { .then((_res) => { if (_res == 'success') { // only success then open folder - this.remoteContainer.openRemoteFolder(data.host, data.username, data.port, data.path); + RemoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path); } }) break; case 'openRemoteFolder': - this.remoteContainer.openRemoteFolder(data.host, data.username, data.port, data.path); + RemoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path); break; case 'getDevstarDomain': panel.webview.postMessage({ command: 'getDevstarDomain', data: { devstarDomain: this.devstarDomain } }) diff --git a/src/remote-container.ts b/src/remote-container.ts index 09c6693..c48f2a5 100644 --- a/src/remote-container.ts +++ b/src/remote-container.ts @@ -137,7 +137,7 @@ export default class RemoteContainer { } - openRemoteFolder(host: string, username: string, port: number, path: string): void { + static openRemoteFolder(host: string, port: number, username: string, path: string): void { var host = `${host}-${port}` const command = `code --remote ssh-remote+${username}@${host} ${path} --reuse-window` let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`);