From 731aee189bd916c2cf65ed8b81d6abdbbc9a0cde Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 27 Apr 2017 12:15:47 +0200 Subject: [PATCH] Fixes #25516: Generated task.json from grunt file has warnings --- .../parts/tasks/electron-browser/task.contribution.ts | 11 ++++++++--- .../parts/tasks/node/processRunnerDetector.ts | 7 +------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index fee150f26af..314a626f91d 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -138,9 +138,14 @@ abstract class OpenTaskConfigurationAction extends Action { value.stderr.forEach((line) => { outputChannel.append(line + '\n'); }); - this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetect', 'Auto detecting the task system failed. Using default template. Consult the task output for details.')); - return selection.content; - } else if (config) { + if (config && (!config.tasks || config.tasks.length === 0)) { + this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetect', 'Auto detecting the task system failed. Using default template. Consult the task output for details.')); + return selection.content; + } else { + this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetectError', 'Auto detecting the task system produced errors. Consult the task output for details.')); + } + } + if (config) { if (value.stdout && value.stdout.length > 0) { value.stdout.forEach(line => outputChannel.append(line + '\n')); } diff --git a/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts b/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts index d184ca10828..92c7473515a 100644 --- a/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts +++ b/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts @@ -320,9 +320,7 @@ export class ProcessRunnerDetector { tasks.forEach((task) => { taskConfigs.push({ taskName: task, - identifier: task, - args: [], - isWatching: false + args: [] }); }); } else { @@ -339,10 +337,8 @@ export class ProcessRunnerDetector { this._stdout.push(nls.localize('TaskSystemDetector.buildTaskDetected', 'Build task named \'{0}\' detected.', name)); taskConfigs.push({ taskName: name, - identifier: name, args: [], isBuildCommand: true, - isWatching: false, problemMatcher: problemMatchers }); } @@ -351,7 +347,6 @@ export class ProcessRunnerDetector { this._stdout.push(nls.localize('TaskSystemDetector.testTaskDetected', 'Test task named \'{0}\' detected.', name)); taskConfigs.push({ taskName: name, - identifier: name, args: [], isTestCommand: true }); -- GitLab