mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Change where task execution context is set
This commit is contained in:
parent
4d21831e50
commit
2d7ae4a7d9
|
@ -613,6 +613,9 @@ export class MainThreadTask implements MainThreadTaskShape {
|
|||
public $registerTaskSystem(key: string, info: TaskSystemInfoDTO): void {
|
||||
let platform: Platform.Platform;
|
||||
switch (info.platform) {
|
||||
case 'Web':
|
||||
platform = Platform.Platform.Web;
|
||||
break;
|
||||
case 'win32':
|
||||
platform = Platform.Platform.Windows;
|
||||
break;
|
||||
|
|
|
@ -696,13 +696,11 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
|
|||
@IExtHostApiDeprecationService deprecationService: IExtHostApiDeprecationService
|
||||
) {
|
||||
super(extHostRpc, initData, workspaceService, editorService, configurationService, extHostTerminalService, logService, deprecationService);
|
||||
if (initData.remote.isRemote && initData.remote.authority) {
|
||||
this.registerTaskSystem(Schemas.vscodeRemote, {
|
||||
scheme: Schemas.vscodeRemote,
|
||||
authority: initData.remote.authority,
|
||||
platform: Platform.PlatformToString(Platform.Platform.Web)
|
||||
});
|
||||
}
|
||||
this.registerTaskSystem(Schemas.vscodeRemote, {
|
||||
scheme: Schemas.vscodeRemote,
|
||||
authority: '',
|
||||
platform: Platform.PlatformToString(Platform.Platform.Web)
|
||||
});
|
||||
}
|
||||
|
||||
public async executeTask(extension: IExtensionDescription, task: vscode.Task): Promise<vscode.TaskExecution> {
|
||||
|
|
|
@ -334,7 +334,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
|||
this.setExecutionContexts();
|
||||
}
|
||||
|
||||
protected setExecutionContexts(custom: boolean = true, shell: boolean = false, process: boolean = false): void {
|
||||
protected setExecutionContexts(custom: boolean = true, shell: boolean = true, process: boolean = true): void {
|
||||
const customContext = CustomExecutionSupportedContext.bindTo(this.contextKeyService);
|
||||
customContext.set(custom);
|
||||
const shellContext = ShellExecutionSupportedContext.bindTo(this.contextKeyService);
|
||||
|
@ -530,6 +530,9 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
|||
}
|
||||
|
||||
public registerTaskSystem(key: string, info: TaskSystemInfo): void {
|
||||
if (info.platform === Platform.Platform.Web) {
|
||||
this.setExecutionContexts(true, false, false);
|
||||
}
|
||||
this._taskSystemInfos.set(key, info);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,10 +25,6 @@ interface WorkspaceFolderConfigurationResult {
|
|||
export class TaskService extends AbstractTaskService {
|
||||
private _configHasErrors: boolean = false;
|
||||
|
||||
protected setExecutionContexts(): void {
|
||||
super.setExecutionContexts(true, true, true);
|
||||
}
|
||||
|
||||
protected getTaskSystem(): ITaskSystem {
|
||||
if (this._taskSystem) {
|
||||
return this._taskSystem;
|
||||
|
|
Loading…
Reference in a new issue