Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb

This commit is contained in:
ADS Merger
2020-07-15 23:51:18 +00:00
parent aae013d498
commit 9d3f12d0b7
554 changed files with 15159 additions and 8223 deletions

View File

@@ -6,7 +6,7 @@
// import * as path from 'vs/base/common/path';
import { URI, UriComponents } from 'vs/base/common/uri';
// import { win32 } from 'vs/base/node/processes';
import { win32 } from 'vs/base/node/processes';
import * as types from 'vs/workbench/api/common/extHostTypes';
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
import type * as vscode from 'vscode';
@@ -54,12 +54,13 @@ export class ExtHostTask extends ExtHostTaskBase {
// We have a preserved ID. So the task didn't change.
if (tTask._id !== undefined) {
// Always get the task execution first to prevent timing issues when retrieving it later
const executionDTO = await this._proxy.$getTaskExecution(TaskHandleDTO.from(tTask));
const handleDto = TaskHandleDTO.from(tTask);
const executionDTO = await this._proxy.$getTaskExecution(handleDto);
if (executionDTO.task === undefined) {
throw new Error('Task from execution DTO is undefined');
}
const execution = await this.getTaskExecution(executionDTO, task);
this._proxy.$executeTask(executionDTO.task).catch(() => { /* The error here isn't actionable. */ });
this._proxy.$executeTask(handleDto).catch(() => { /* The error here isn't actionable. */ });
return execution;
} else {
const dto = TaskDTO.from(task, extension);
@@ -195,4 +196,8 @@ export class ExtHostTask extends ExtHostTaskBase {
public async $jsonTasksSupported(): Promise<boolean> {
return true;
}
public async $findExecutable(command: string, cwd?: string, paths?: string[]): Promise<string> {
return win32.findExecutable(command, cwd, paths);
}
}