Skip to content

Commit

Permalink
Fix bug with terminal-initiated connections
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Oct 2, 2021
1 parent c121647 commit 6f6e3ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

### Fixes
- Fix remote `code` command (#267) not working without the filesystem already connected (#292)
- Fix bug with broken connections when connections are initiated by spawning named terminals

### Changes
- Proxy hop field now actually lists all known configs to pick from, instead of "TO DO" (#290)
Expand Down
2 changes: 1 addition & 1 deletion src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class Manager implements vscode.TaskProvider, vscode.TerminalLinkProvider
public async createTerminal(name: string, config?: FileSystemConfig | Connection, uri?: vscode.Uri): Promise<void> {
const { createTerminal } = await import('./pseudoTerminal');
// Create connection (early so we have .actualConfig.root)
const con = (config && 'client' in config) ? config : await this.connectionManager.createConnection(name, config);
const con = (config && 'client' in config) ? config : await this.connectionManager.createConnection(config?.name || name, config);
// Create pseudo terminal
this.connectionManager.update(con, con => con.pendingUserCount++);
const pty = await createTerminal({ connection: con, workingDirectory: uri?.path || con.actualConfig.root });
Expand Down

0 comments on commit 6f6e3ad

Please sign in to comment.