mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 09:35:41 -05:00
Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user