未验证 提交 5e5fa3ed 编写于 作者: A Alex Ross 提交者: GitHub

Tasks without a registered definition should run (#102696)

Fixes #102684
上级 a786284f
......@@ -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>();
......
......@@ -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> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册