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 fee150f26af3bf821bd9f77684b71ae6cc34e2fe..314a626f91de356d9614fd116d7959f9eaa35edc 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 d184ca1082897a0c768f7a9114d8c35a52cace5c..92c7473515ad6facf96d93343c4d244779793ea5 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 });