Prioritize configured tasks in getTask

Fixes #109939
This commit is contained in:
Alex Ross
2020-11-12 16:57:30 +01:00
parent 7b5849b123
commit e526f16131
@@ -576,7 +576,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
if (!values) {
return undefined;
}
return values.find(task => task.matches(key, compareId));
values = values.filter(task => task.matches(key, compareId)).sort(task => task._source.kind === TaskSourceKind.Extension ? 1 : -1);
return values.length > 0 ? values[0] : undefined;
});
}