(cherry picked from commit 6122f96607)
This commit is contained in:
Aditya Bist
2021-08-11 10:40:18 -07:00
committed by GitHub
parent 98dc71a08b
commit 4b12216c07

View File

@@ -3,15 +3,15 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
// import * as path from 'vs/base/common/path'; import * as path from 'vs/base/common/path';
import { UriComponents } from 'vs/base/common/uri'; 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 * as types from 'vs/workbench/api/common/extHostTypes';
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace'; import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
import type * as vscode from 'vscode'; import type * as vscode from 'vscode';
import * as tasks from '../common/shared/tasks'; import * as tasks from '../common/shared/tasks';
// import { ExtHostVariableResolverService } from 'vs/workbench/api/common/extHostDebugService'; import { ExtHostVariableResolverService } from 'vs/workbench/api/common/extHostDebugService';
import { IExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors'; import { IExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { IExtHostConfiguration } from 'vs/workbench/api/common/extHostConfiguration'; import { IExtHostConfiguration } from 'vs/workbench/api/common/extHostConfiguration';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
@@ -22,9 +22,10 @@ import { ExtHostTaskBase, TaskHandleDTO, TaskDTO, CustomExecutionDTO, HandlerDat
import { Schemas } from 'vs/base/common/network'; import { Schemas } from 'vs/base/common/network';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IExtHostApiDeprecationService } from 'vs/workbench/api/common/extHostApiDeprecationService'; import { IExtHostApiDeprecationService } from 'vs/workbench/api/common/extHostApiDeprecationService';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
export class ExtHostTask extends ExtHostTaskBase { export class ExtHostTask extends ExtHostTaskBase {
// private _variableResolver: ExtHostVariableResolverService | undefined; {{SQL CARBON EDIT}} private _variableResolver: ExtHostVariableResolverService | undefined;
constructor( constructor(
@IExtHostRpcService extHostRpc: IExtHostRpcService, @IExtHostRpcService extHostRpc: IExtHostRpcService,
@@ -123,17 +124,17 @@ export class ExtHostTask extends ExtHostTaskBase {
return resolvedTaskDTO; return resolvedTaskDTO;
} }
// {{SQL CARBON EDIT}}
// private async getVariableResolver(workspaceFolders: vscode.WorkspaceFolder[]): Promise<ExtHostVariableResolverService> { private async getVariableResolver(workspaceFolders: vscode.WorkspaceFolder[]): Promise<ExtHostVariableResolverService> {
// if (this._variableResolver === undefined) { if (this._variableResolver === undefined) {
// const configProvider = await this._configurationService.getConfigProvider(); const configProvider = await this._configurationService.getConfigProvider();
// this._variableResolver = new ExtHostVariableResolverService(workspaceFolders, this._editorService, configProvider, this.workspaceService); this._variableResolver = new ExtHostVariableResolverService(workspaceFolders, this._editorService, configProvider, this.workspaceService);
// } }
// return this._variableResolver; return this._variableResolver;
// } }
public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }> { public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }> {
/*const uri: URI = URI.revive(uriComponents); const uri: URI = URI.revive(uriComponents);
const result = { const result = {
process: <unknown>undefined as string, process: <unknown>undefined as string,
variables: Object.create(null) variables: Object.create(null)
@@ -169,8 +170,7 @@ export class ExtHostTask extends ExtHostTaskBase {
paths paths
); );
} }
return result;*/ // {{SQL CARBON EDIT}} return result;
return undefined;
} }
public $getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }> { public $getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }> {