reveal = Never/Silent not respected when running task programmatically
spmeesseman opened this issue · 3 comments
spmeesseman commented
- VSCode Version: 1.53
- OS Version: Windows 10
Steps to Reproduce:
- Create an instance of Task
- Set instance.presentationOptions.reveal = TaskRevealKind.Never (or TaskRevealKind.Silent)
- Call vscode.tasks.executeTask()
Does this issue occur when all extensions are disabled?: Yes
Looks like same issue as #66749 back again?
Expected Behavior: No terminal should open
Actual Behavior: Terminal opens no matter what
Example:
private async run(task: Task)
{
task.presentationOptions.reveal = TaskRevealKind.Never; // or TaskRevealKind.Silent
try {
await vscode.tasks.executeTask(task);
}
catch (e) {
}
vscodebot commented
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
gjsjohnmurray commented
/assign @alexr00
alexr00 commented
I am not able to repro this issue. My test code:
const disposable = vscode.commands.registerCommand('extension.helloWorld', () => {
const task = new vscode.Task(
{ type: 'shell' }, vscode.workspace.workspaceFolders![0], 'myTask',
'myExt', new vscode.ShellExecution('dir'));
task.presentationOptions.reveal = vscode.TaskRevealKind.Silent;
vscode.tasks.executeTask(task);
});
I also tested with TaskRevealKind.Never
. The terminal is not shown.