Fix bug with terminal-initiated connections

issue/311
Kelvin Schoofs 3 years ago
parent c121647485
commit 6f6e3ad838

@ -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)

@ -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 });

Loading…
Cancel
Save