mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Resolve customExecution task definition before going to exthost
Part of #81007
This commit is contained in:
@@ -475,11 +475,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask
|
||||
return this._onDidExecuteTask.event;
|
||||
}
|
||||
|
||||
protected async resolveDefinition(uri: number | UriComponents | undefined, definition: vscode.TaskDefinition | undefined): Promise<vscode.TaskDefinition | undefined> {
|
||||
return definition;
|
||||
}
|
||||
|
||||
public async $onDidStartTask(execution: tasks.TaskExecutionDTO, terminalId: number): Promise<void> {
|
||||
public async $onDidStartTask(execution: tasks.TaskExecutionDTO, terminalId: number, resolvedDefinition?: tasks.TaskDefinitionDTO): Promise<void> {
|
||||
const customExecution: types.CustomExecution | undefined = this._providedCustomExecutions2.get(execution.id);
|
||||
if (customExecution) {
|
||||
if (this._activeCustomExecutions2.get(execution.id) !== undefined) {
|
||||
@@ -488,7 +484,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask
|
||||
|
||||
// Clone the custom execution to keep the original untouched. This is important for multiple runs of the same task.
|
||||
this._activeCustomExecutions2.set(execution.id, customExecution);
|
||||
this._terminalService.attachPtyToTerminal(terminalId, await customExecution.callback(await this.resolveDefinition(execution.task?.source.scope, execution.task?.definition)));
|
||||
this._terminalService.attachPtyToTerminal(terminalId, await customExecution.callback(resolvedDefinition));
|
||||
}
|
||||
this._lastStartedTask = execution.id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user