Removed deprecated Task constructor

This commit is contained in:
Oliver Cooper 2021-09-08 10:46:31 +12:00
parent 0517247bbc
commit 001608914b

View file

@ -109,27 +109,15 @@ export async function buildCargoTask(
exec = new vscode.ProcessExecution(fullCommand[0], fullCommand.slice(1), definition);
}
if (scope) {
return new vscode.Task(
definition,
scope,
scope ?? vscode.TaskScope.Workspace,
name,
TASK_SOURCE,
exec,
['$rustc']
);
}
else {
// if the original task did not provide a scope retain the original lack of scope
return new vscode.Task(
definition,
name,
TASK_SOURCE,
exec,
['$rustc']
);
}
}
export function activateTaskProvider(config: Config): vscode.Disposable {
const provider = new CargoTaskProvider(config);