Skip to content

Commit b4eb7c9

Browse files
committed
Workaround exception thrown on pty host
Fixes microsoft#222323
1 parent 03f4cbc commit b4eb7c9

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)