Skip to content

Commit 1386fba

Browse files
committed
Don't show the output panel in jake and grunt extensions
Fixes microsoft#64900
1 parent 58e6b8f commit 1386fba

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

extensions/grunt/src/main.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ function getOutputChannel(): vscode.OutputChannel {
5959
return _channel;
6060
}
6161

62+
function showError() {
63+
vscode.window.showWarningMessage(localize('gulpTaskDetectError', 'Problem finding jake tasks. See the output for more information.'),
64+
localize('jakeShowOutput', 'Go to output')).then(() => {
65+
getOutputChannel().show(true);
66+
});
67+
}
6268
interface GruntTaskDefinition extends vscode.TaskDefinition {
6369
task: string;
6470
file?: string;
@@ -120,7 +126,7 @@ class FolderDetector {
120126
let { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
121127
if (stderr) {
122128
getOutputChannel().appendLine(stderr);
123-
getOutputChannel().show(true);
129+
showError();
124130
}
125131
let result: vscode.Task[] = [];
126132
if (stdout) {
@@ -186,7 +192,7 @@ class FolderDetector {
186192
channel.appendLine(err.stdout);
187193
}
188194
channel.appendLine(localize('execFailed', 'Auto detecting Grunt for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown'));
189-
channel.show(true);
195+
showError();
190196
return emptyTasks;
191197
}
192198
}

extensions/jake/src/main.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ function getOutputChannel(): vscode.OutputChannel {
5959
return _channel;
6060
}
6161

62+
function showError() {
63+
vscode.window.showWarningMessage(localize('gulpTaskDetectError', 'Problem finding jake tasks. See the output for more information.'),
64+
localize('jakeShowOutput', 'Go to output')).then(() => {
65+
getOutputChannel().show(true);
66+
});
67+
}
68+
6269
interface JakeTaskDefinition extends vscode.TaskDefinition {
6370
task: string;
6471
file?: string;
@@ -124,7 +131,7 @@ class FolderDetector {
124131
let { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
125132
if (stderr) {
126133
getOutputChannel().appendLine(stderr);
127-
getOutputChannel().show(true);
134+
showError();
128135
}
129136
let result: vscode.Task[] = [];
130137
if (stdout) {
@@ -163,7 +170,7 @@ class FolderDetector {
163170
channel.appendLine(err.stdout);
164171
}
165172
channel.appendLine(localize('execFailed', 'Auto detecting Jake for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown'));
166-
channel.show(true);
173+
showError();
167174
return emptyTasks;
168175
}
169176
}

0 commit comments

Comments
 (0)