fix: cannot connect devcontainer by sshkey
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user