Don't show the output panel in jake and grunt extensions

Fixes #64900
This commit is contained in:
Alex Ross 2018-12-20 14:54:55 +01:00
parent 58e6b8fa73
commit 1386fba3be
2 changed files with 17 additions and 4 deletions

View file

@ -59,6 +59,12 @@ function getOutputChannel(): vscode.OutputChannel {
return _channel;
}
function showError() {
vscode.window.showWarningMessage(localize('gulpTaskDetectError', 'Problem finding jake tasks. See the output for more information.'),
localize('jakeShowOutput', 'Go to output')).then(() => {
getOutputChannel().show(true);
});
}
interface GruntTaskDefinition extends vscode.TaskDefinition {
task: string;
file?: string;
@ -120,7 +126,7 @@ class FolderDetector {
let { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
if (stderr) {
getOutputChannel().appendLine(stderr);
getOutputChannel().show(true);
showError();
}
let result: vscode.Task[] = [];
if (stdout) {
@ -186,7 +192,7 @@ class FolderDetector {
channel.appendLine(err.stdout);
}
channel.appendLine(localize('execFailed', 'Auto detecting Grunt for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown'));
channel.show(true);
showError();
return emptyTasks;
}
}

View file

@ -59,6 +59,13 @@ function getOutputChannel(): vscode.OutputChannel {
return _channel;
}
function showError() {
vscode.window.showWarningMessage(localize('gulpTaskDetectError', 'Problem finding jake tasks. See the output for more information.'),
localize('jakeShowOutput', 'Go to output')).then(() => {
getOutputChannel().show(true);
});
}
interface JakeTaskDefinition extends vscode.TaskDefinition {
task: string;
file?: string;
@ -124,7 +131,7 @@ class FolderDetector {
let { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
if (stderr) {
getOutputChannel().appendLine(stderr);
getOutputChannel().show(true);
showError();
}
let result: vscode.Task[] = [];
if (stdout) {
@ -163,7 +170,7 @@ class FolderDetector {
channel.appendLine(err.stdout);
}
channel.appendLine(localize('execFailed', 'Auto detecting Jake for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown'));
channel.show(true);
showError();
return emptyTasks;
}
}