From d6354443f436ee88df485e11b74f5bfb81118ea9 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Tue, 26 May 2020 11:30:58 +0200 Subject: [PATCH] Hack to work around terminal firing exit before line data Part of #92868 --- .../contrib/tasks/browser/terminalTaskSystem.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts index 34777c0470d..143aab4a0b3 100644 --- a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts +++ b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts @@ -821,7 +821,6 @@ export class TerminalTaskSystem implements ITaskSystem { }); promise = new Promise((resolve, reject) => { const onExit = terminal!.onExit((exitCode) => { - onData.dispose(); onExit.dispose(); let key = task.getMapKey(); this.removeFromActiveTasks(task); @@ -847,8 +846,12 @@ export class TerminalTaskSystem implements ITaskSystem { this.terminalService.setActiveInstance(terminal); this.terminalService.showPanel(false); } - startStopProblemMatcher.done(); - startStopProblemMatcher.dispose(); + // Hack to work around #92868 until terminal is fixed. + setTimeout(() => { + onData.dispose(); + startStopProblemMatcher.done(); + startStopProblemMatcher.dispose(); + }, 100); if (!processStartedSignaled && terminal) { this._onDidStateChange.fire(TaskEvent.create(TaskEventKind.ProcessStarted, task, terminal.processId!)); processStartedSignaled = true;