Skip to content

Commit 2d7ae4a

Browse files
committed
Change where task execution context is set
1 parent 4d21831 commit 2d7ae4a

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/vs/workbench/api/browser/mainThreadTask.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,9 @@ export class MainThreadTask implements MainThreadTaskShape {
613613
public $registerTaskSystem(key: string, info: TaskSystemInfoDTO): void {
614614
let platform: Platform.Platform;
615615
switch (info.platform) {
616+
case 'Web':
617+
platform = Platform.Platform.Web;
618+
break;
616619
case 'win32':
617620
platform = Platform.Platform.Windows;
618621
break;

src/vs/workbench/api/common/extHostTask.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,13 +696,11 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
696696
@IExtHostApiDeprecationService deprecationService: IExtHostApiDeprecationService
697697
) {
698698
super(extHostRpc, initData, workspaceService, editorService, configurationService, extHostTerminalService, logService, deprecationService);
699-
if (initData.remote.isRemote && initData.remote.authority) {
700-
this.registerTaskSystem(Schemas.vscodeRemote, {
701-
scheme: Schemas.vscodeRemote,
702-
authority: initData.remote.authority,
703-
platform: Platform.PlatformToString(Platform.Platform.Web)
704-
});
705-
}
699+
this.registerTaskSystem(Schemas.vscodeRemote, {
700+
scheme: Schemas.vscodeRemote,
701+
authority: '',
702+
platform: Platform.PlatformToString(Platform.Platform.Web)
703+
});
706704
}
707705

708706
public async executeTask(extension: IExtensionDescription, task: vscode.Task): Promise<vscode.TaskExecution> {

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
334334
this.setExecutionContexts();
335335
}
336336

337-
protected setExecutionContexts(custom: boolean = true, shell: boolean = false, process: boolean = false): void {
337+
protected setExecutionContexts(custom: boolean = true, shell: boolean = true, process: boolean = true): void {
338338
const customContext = CustomExecutionSupportedContext.bindTo(this.contextKeyService);
339339
customContext.set(custom);
340340
const shellContext = ShellExecutionSupportedContext.bindTo(this.contextKeyService);
@@ -530,6 +530,9 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
530530
}
531531

532532
public registerTaskSystem(key: string, info: TaskSystemInfo): void {
533+
if (info.platform === Platform.Platform.Web) {
534+
this.setExecutionContexts(true, false, false);
535+
}
533536
this._taskSystemInfos.set(key, info);
534537
}
535538

src/vs/workbench/contrib/tasks/electron-browser/taskService.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ interface WorkspaceFolderConfigurationResult {
2525
export class TaskService extends AbstractTaskService {
2626
private _configHasErrors: boolean = false;
2727

28-
protected setExecutionContexts(): void {
29-
super.setExecutionContexts(true, true, true);
30-
}
31-
3228
protected getTaskSystem(): ITaskSystem {
3329
if (this._taskSystem) {
3430
return this._taskSystem;

0 commit comments

Comments
 (0)