Fix task user task exeuction through AP.

Fixes #90820
This commit is contained in:
Alex Ross
2020-02-21 10:58:11 +01:00
parent d3d3e8c311
commit 2c1ad8e921
5 changed files with 11 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ import { Schemas } from 'vs/base/common/network';
import * as Platform from 'vs/base/common/platform';
import { ILogService } from 'vs/platform/log/common/log';
import { IExtHostApiDeprecationService } from 'vs/workbench/api/common/extHostApiDeprecationService';
import { USER_TASKS_GROUP_KEY } from 'vs/workbench/contrib/tasks/common/taskService';
export interface IExtHostTask extends ExtHostTaskShape {
@@ -192,9 +193,11 @@ export namespace CustomExecutionDTO {
export namespace TaskHandleDTO {
export function from(value: types.Task): tasks.TaskHandleDTO {
let folder: UriComponents | undefined;
let folder: UriComponents | string;
if (value.scope !== undefined && typeof value.scope !== 'number') {
folder = value.scope.uri;
} else if (value.scope !== undefined && typeof value.scope === 'number') {
folder = USER_TASKS_GROUP_KEY;
}
return {
id: value._id!,