Skip to content

Commit 2da39bd

Browse files
authored
Merge pull request microsoft#223496 from microsoft/tyriar/222323
Workaround exception thrown on pty host
2 parents f22fd8e + b4eb7c9 commit 2da39bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/platform/terminal/node/terminalProcess.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
401401
if (this._store.isDisposed) {
402402
return;
403403
}
404-
this._currentTitle = ptyProcess.process;
404+
// HACK: The node-pty API can return undefined somehow https://github.com/microsoft/vscode/issues/222323
405+
this._currentTitle = (ptyProcess.process ?? '');
405406
this._onDidChangeProperty.fire({ type: ProcessPropertyType.Title, value: this._currentTitle });
406407
// If fig is installed it may change the title of the process
407408
const sanitizedTitle = this.currentTitle.replace(/ \(figterm\)$/g, '');

0 commit comments

Comments
 (0)