mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-26 13:19:42 +00:00
@@ -120,8 +120,7 @@ class FolderDetector {
|
||||
}
|
||||
|
||||
public async getTask(_task: vscode.Task): Promise<vscode.Task | undefined> {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const taskDefinition = <any>_task.definition;
|
||||
const taskDefinition = _task.definition;
|
||||
const gruntTask = taskDefinition.task;
|
||||
if (gruntTask) {
|
||||
const options: vscode.ShellExecutionOptions = { cwd: this.workspaceFolder.uri.fsPath };
|
||||
|
||||
@@ -150,11 +150,9 @@ class FolderDetector {
|
||||
}
|
||||
|
||||
public async getTask(_task: vscode.Task): Promise<vscode.Task | undefined> {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const gulpTask = (<any>_task.definition).task;
|
||||
const gulpTask = _task.definition.task;
|
||||
if (gulpTask) {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const kind: GulpTaskDefinition = (<any>_task.definition);
|
||||
const kind = _task.definition as GulpTaskDefinition;
|
||||
const options: vscode.ShellExecutionOptions = { cwd: this.workspaceFolder.uri.fsPath };
|
||||
const task = new vscode.Task(kind, this.workspaceFolder, gulpTask, 'gulp', new vscode.ShellExecution(await this._gulpCommand, [gulpTask], options));
|
||||
return task;
|
||||
|
||||
@@ -120,11 +120,9 @@ class FolderDetector {
|
||||
}
|
||||
|
||||
public async getTask(_task: vscode.Task): Promise<vscode.Task | undefined> {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const jakeTask = (<any>_task.definition).task;
|
||||
const jakeTask = _task.definition.task;
|
||||
if (jakeTask) {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const kind: JakeTaskDefinition = (<any>_task.definition);
|
||||
const kind = _task.definition as JakeTaskDefinition;
|
||||
const options: vscode.ShellExecutionOptions = { cwd: this.workspaceFolder.uri.fsPath };
|
||||
const task = new vscode.Task(kind, this.workspaceFolder, jakeTask, 'jake', new vscode.ShellExecution(await this._jakeCommand, [jakeTask], options));
|
||||
return task;
|
||||
|
||||
@@ -58,11 +58,9 @@ export class NpmTaskProvider implements TaskProvider {
|
||||
}
|
||||
|
||||
public async resolveTask(_task: Task): Promise<Task | undefined> {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const npmTask = (<any>_task.definition).script;
|
||||
const npmTask = _task.definition.script;
|
||||
if (npmTask) {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const kind: INpmTaskDefinition = (<any>_task.definition);
|
||||
const kind = _task.definition as INpmTaskDefinition;
|
||||
let packageJsonUri: Uri;
|
||||
if (_task.scope === undefined || _task.scope === TaskScope.Global || _task.scope === TaskScope.Workspace) {
|
||||
// scope is required to be a WorkspaceFolder for resolveTask
|
||||
|
||||
Reference in New Issue
Block a user