Skip to content

Commit 5ce6349

Browse files
authored
Merge pull request microsoft#201064 from jeanp413/fix-200430
Fix task progress indicator does not appear after the first time
2 parents 59c4ac3 + e879ee4 commit 5ce6349

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,15 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
960960
return Promise.reject(new Error(`Failed to create terminal for task ${task._label}`));
961961
}
962962

963+
this._fireTaskEvent(TaskEvent.start(task, terminal.instanceId, resolver.values));
964+
const mapKey = task.getMapKey();
965+
this._busyTasks[mapKey] = task;
966+
this._fireTaskEvent(TaskEvent.general(TaskEventKind.Active, task, terminal.instanceId));
967+
968+
const problemMatchers = await this._resolveMatchers(resolver, task.configurationProperties.problemMatchers);
969+
const startStopProblemMatcher = new StartStopProblemCollector(problemMatchers, this._markerService, this._modelService, ProblemHandlingStrategy.Clean, this._fileService);
970+
this._terminalStatusManager.addTerminal(task, terminal, startStopProblemMatcher);
971+
963972
let processStartedSignaled = false;
964973
terminal.processReady.then(() => {
965974
if (!processStartedSignaled) {
@@ -969,13 +978,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
969978
}, (_error) => {
970979
// The process never got ready. Need to think how to handle this.
971980
});
972-
this._fireTaskEvent(TaskEvent.start(task, terminal.instanceId, resolver.values));
973-
const mapKey = task.getMapKey();
974-
this._busyTasks[mapKey] = task;
975-
this._fireTaskEvent(TaskEvent.general(TaskEventKind.Active, task, terminal.instanceId));
976-
const problemMatchers = await this._resolveMatchers(resolver, task.configurationProperties.problemMatchers);
977-
const startStopProblemMatcher = new StartStopProblemCollector(problemMatchers, this._markerService, this._modelService, ProblemHandlingStrategy.Clean, this._fileService);
978-
this._terminalStatusManager.addTerminal(task, terminal, startStopProblemMatcher);
981+
979982
const onData = terminal.onLineData((line) => {
980983
startStopProblemMatcher.processLine(line);
981984
});

0 commit comments

Comments
 (0)