Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)

* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2

* update distro

* fix layering

* update distro

* fix tests
This commit is contained in:
Anthony Dresser
2020-01-22 13:42:37 -08:00
committed by GitHub
parent 977111eb21
commit bd7aac8ee0
895 changed files with 24651 additions and 14520 deletions

View File

@@ -38,6 +38,8 @@ export const enum TaskRunResult {
export class DebugTaskRunner {
private canceled = false;
constructor(
@ITaskService private readonly taskService: ITaskService,
@IMarkerService private readonly markerService: IMarkerService,
@@ -46,9 +48,17 @@ export class DebugTaskRunner {
@IDialogService private readonly dialogService: IDialogService,
) { }
cancel(): void {
this.canceled = true;
}
async runTaskAndCheckErrors(root: IWorkspaceFolder | IWorkspace | undefined, taskId: string | TaskIdentifier | undefined, onError: (msg: string, actions: IAction[]) => Promise<void>): Promise<TaskRunResult> {
try {
this.canceled = false;
const taskSummary = await this.runTask(root, taskId);
if (this.canceled) {
return TaskRunResult.Failure;
}
const errorCount = taskId ? this.markerService.getStatistics().errors : 0;
const successExitCode = taskSummary && taskSummary.exitCode === 0;