Skip to content

Commit f6e8c63

Browse files
committed
Don't use getStatistics to get errors in prelaunch task
Fixes microsoft#134383
1 parent 704e0d2 commit f6e8c63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/debug/browser/debugTaskRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { IWorkspaceFolder, IWorkspace } from 'vs/platform/workspace/common/works
1313
import { TaskEvent, TaskEventKind, TaskIdentifier } from 'vs/workbench/contrib/tasks/common/tasks';
1414
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
1515
import { withUndefinedAsNull } from 'vs/base/common/types';
16-
import { IMarkerService } from 'vs/platform/markers/common/markers';
16+
import { IMarkerService, MarkerSeverity } from 'vs/platform/markers/common/markers';
1717
import { IDebugConfiguration } from 'vs/workbench/contrib/debug/common/debug';
1818
import { createErrorWithActions } from 'vs/base/common/errors';
1919
import { IViewsService } from 'vs/workbench/common/views';
@@ -64,7 +64,7 @@ export class DebugTaskRunner {
6464
return TaskRunResult.Failure;
6565
}
6666

67-
const errorCount = taskId ? this.markerService.getStatistics().errors : 0;
67+
const errorCount = taskId ? this.markerService.read().filter(marker => marker.severity === MarkerSeverity.Error).length : 0;
6868
const successExitCode = taskSummary && taskSummary.exitCode === 0;
6969
const failureExitCode = taskSummary && taskSummary.exitCode !== 0;
7070
const onTaskErrors = this.configurationService.getValue<IDebugConfiguration>('debug').onTaskErrors;

0 commit comments

Comments
 (0)