Remove getDefaultShellAndArgs from tasks

Fixes #123732
This commit is contained in:
Daniel Imms 2021-05-13 06:36:08 -07:00
parent da1df62ee5
commit 5d95c01ec1
6 changed files with 1 additions and 29 deletions

View file

@ -702,9 +702,6 @@ export class MainThreadTask implements MainThreadTaskShape {
});
});
},
getDefaultShellAndArgs: (): Promise<{ shell: string, args: string[] | string | undefined }> => {
return Promise.resolve(this._proxy.$getDefaultShellAndArgs());
},
findExecutable: (command: string, cwd?: string, paths?: string[]): Promise<string | undefined> => {
return this._proxy.$findExecutable(command, cwd, paths);
}

View file

@ -1667,11 +1667,6 @@ export interface ExtHostTelemetryShape {
$onDidChangeTelemetryEnabled(enabled: boolean): void;
}
export interface IShellAndArgsDto {
shell: string;
args: string[] | string | undefined;
}
export interface ITerminalLinkDto {
/** The ID of the link to enable activation and disposal. */
id: number;
@ -1727,7 +1722,6 @@ export interface ExtHostTaskShape {
$onDidEndTaskProcess(value: tasks.TaskProcessEndedDTO): void;
$OnDidEndTask(execution: tasks.TaskExecutionDTO): void;
$resolveVariables(workspaceFolder: UriComponents, toResolve: { process?: { name: string; cwd?: string; }, variables: string[]; }): Promise<{ process?: string; variables: { [key: string]: string; }; }>;
$getDefaultShellAndArgs(): Thenable<{ shell: string, args: string[] | string | undefined; }>;
$jsonTasksSupported(): Thenable<boolean>;
$findExecutable(command: string, cwd?: string, paths?: string[]): Promise<string | undefined>;
}

View file

@ -605,8 +605,6 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask
public abstract $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }>;
public abstract $getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }>;
private nextHandle(): number {
return this._handleCounter++;
}
@ -775,10 +773,6 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
return result;
}
public $getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }> {
throw new Error('Not implemented');
}
public async $jsonTasksSupported(): Promise<boolean> {
return false;
}

View file

@ -5,7 +5,7 @@
import type * as vscode from 'vscode';
import { Event, Emitter } from 'vs/base/common/event';
import { ExtHostTerminalServiceShape, MainContext, MainThreadTerminalServiceShape, ITerminalDimensionsDto, ITerminalLinkDto, TerminalIdentifier, IShellAndArgsDto } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostTerminalServiceShape, MainContext, MainThreadTerminalServiceShape, ITerminalDimensionsDto, ITerminalLinkDto, TerminalIdentifier } from 'vs/workbench/api/common/extHost.protocol';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { URI } from 'vs/base/common/uri';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
@ -42,7 +42,6 @@ export interface IExtHostTerminalService extends ExtHostTerminalServiceShape, ID
getDefaultShellArgs(useAutomationShell: boolean): string[] | string;
registerLinkProvider(provider: vscode.TerminalLinkProvider): vscode.Disposable;
getEnvironmentVariableCollection(extension: IExtensionDescription, persistent?: boolean): vscode.EnvironmentVariableCollection;
getDefaultShellAndArgs(useAutomationShell: boolean): IShellAndArgsDto;
}
export const IExtHostTerminalService = createDecorator<IExtHostTerminalService>('IExtHostTerminalService');
@ -346,13 +345,6 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
return profile?.args || [''];
}
public getDefaultShellAndArgs(useAutomationShell: boolean): IShellAndArgsDto {
return {
shell: this.getDefaultShell(useAutomationShell),
args: this.getDefaultShellArgs(useAutomationShell)
};
}
public createExtensionTerminal(options: vscode.ExtensionTerminalOptions): vscode.Terminal {
const terminal = new ExtHostTerminal(this._proxy, generateUuid(), options, options.name);
const p = new ExtHostPseudoterminal(options.pty);

View file

@ -174,10 +174,6 @@ export class ExtHostTask extends ExtHostTaskBase {
return result;
}
public async $getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }> {
return this._terminalService.getDefaultShellAndArgs(true);
}
public async $jsonTasksSupported(): Promise<boolean> {
return true;
}

View file

@ -120,7 +120,6 @@ export interface TaskSystemInfo {
context: any;
uriProvider: (this: void, path: string) => URI;
resolveVariables(workspaceFolder: IWorkspaceFolder, toResolve: ResolveSet, target: ConfigurationTarget): Promise<ResolvedVariables | undefined>;
getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }>;
findExecutable(command: string, cwd?: string, paths?: string[]): Promise<string | undefined>;
}