Tasks without a registered definition should run (#102696)

Fixes #102684
This commit is contained in:
Alex Ross 2020-07-16 14:42:02 +02:00 committed by GitHub
parent a786284f7d
commit 5e5fa3edde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomEx
disposables.length = 0;
});
test.skip('CustomExecution task should start and shutdown successfully', (done) => {
test('CustomExecution task should start and shutdown successfully', (done) => {
interface CustomTestingTaskDefinition extends TaskDefinition {
/**
* One of the task properties. This can be used to customize the task in the tasks.json
@ -110,7 +110,7 @@ import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomEx
commands.executeCommand('workbench.action.tasks.runTask', `${taskType}: ${taskName}`);
});
test.skip('sync CustomExecution task should flush all data on close', (done) => {
test('sync CustomExecution task should flush all data on close', (done) => {
interface CustomTestingTaskDefinition extends TaskDefinition {
/**
* One of the task properties. This can be used to customize the task in the tasks.json
@ -222,7 +222,7 @@ import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomEx
});
// https://github.com/microsoft/vscode/issues/100577
test.skip('A CustomExecution task can be fetched and executed', () => {
test('A CustomExecution task can be fetched and executed', () => {
return new Promise(async (resolve, reject) => {
class CustomTerminal implements Pseudoterminal {
private readonly writeEmitter = new EventEmitter<string>();

View file

@ -1584,7 +1584,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
private isTaskProviderEnabled(type: string) {
const definition = TaskDefinitionRegistry.get(type);
return !definition.when || this.contextKeyService.contextMatchesRules(definition.when);
return !definition || !definition.when || this.contextKeyService.contextMatchesRules(definition.when);
}
private getGroupedTasks(type?: string): Promise<TaskMap> {