提交 731aee18 编写于 作者: D Dirk Baeumer

Fixes #25516: Generated task.json from grunt file has warnings

上级 f78b54c2
...@@ -138,9 +138,14 @@ abstract class OpenTaskConfigurationAction extends Action { ...@@ -138,9 +138,14 @@ abstract class OpenTaskConfigurationAction extends Action {
value.stderr.forEach((line) => { value.stderr.forEach((line) => {
outputChannel.append(line + '\n'); 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.')); if (config && (!config.tasks || config.tasks.length === 0)) {
return selection.content; this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetect', 'Auto detecting the task system failed. Using default template. Consult the task output for details.'));
} else if (config) { 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) { if (value.stdout && value.stdout.length > 0) {
value.stdout.forEach(line => outputChannel.append(line + '\n')); value.stdout.forEach(line => outputChannel.append(line + '\n'));
} }
......
...@@ -320,9 +320,7 @@ export class ProcessRunnerDetector { ...@@ -320,9 +320,7 @@ export class ProcessRunnerDetector {
tasks.forEach((task) => { tasks.forEach((task) => {
taskConfigs.push({ taskConfigs.push({
taskName: task, taskName: task,
identifier: task, args: []
args: [],
isWatching: false
}); });
}); });
} else { } else {
...@@ -339,10 +337,8 @@ export class ProcessRunnerDetector { ...@@ -339,10 +337,8 @@ export class ProcessRunnerDetector {
this._stdout.push(nls.localize('TaskSystemDetector.buildTaskDetected', 'Build task named \'{0}\' detected.', name)); this._stdout.push(nls.localize('TaskSystemDetector.buildTaskDetected', 'Build task named \'{0}\' detected.', name));
taskConfigs.push({ taskConfigs.push({
taskName: name, taskName: name,
identifier: name,
args: [], args: [],
isBuildCommand: true, isBuildCommand: true,
isWatching: false,
problemMatcher: problemMatchers problemMatcher: problemMatchers
}); });
} }
...@@ -351,7 +347,6 @@ export class ProcessRunnerDetector { ...@@ -351,7 +347,6 @@ export class ProcessRunnerDetector {
this._stdout.push(nls.localize('TaskSystemDetector.testTaskDetected', 'Test task named \'{0}\' detected.', name)); this._stdout.push(nls.localize('TaskSystemDetector.testTaskDetected', 'Test task named \'{0}\' detected.', name));
taskConfigs.push({ taskConfigs.push({
taskName: name, taskName: name,
identifier: name,
args: [], args: [],
isTestCommand: true isTestCommand: true
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册