2152
2153
if ((!result.custom || result.custom.length === 0) && (globals.command && globals.command.name)) {
2154
>
const matchers: ProblemMatcher[] = ProblemMatcherConverter.from(fileConfig.problemMatcher, context).value ?? [];
taskConfiguration.ts
2155
>
const isBackground = fileConfig.isBackground ? !!fileConfig.isBackground : fileConfig.isWatching ? !!fileConfig.isWatching : undefined;
2156
>
const name = Tasks.CommandString.value(globals.command.name);
2157
>
const task: Tasks.CustomTask = new Tasks.CustomTask(
2158
>
context.uuidMap.getUUID(name),
2159
>
Object.assign({}, source, 'workspace', { config: { index: -1, element: fileConfig, workspaceFolder: context.workspaceFolder } }) satisfies Tasks.IWorkspaceTaskSource,
2160
>
name,
2161
>
Tasks.CUSTOMIZED_TASK_TYPE,
2162
>
{
2163
>
name: undefined,
2164
>
runtime: undefined,
2165
>
presentation: undefined,
2166
>
suppressTaskName: true
2167
>
},
2168
>
false,
2169
>
{ reevaluateOnRerun: true },
2170
>
{
2171
>
name: name,
2172
>
identifier: name,
2173
>
group: Tasks.TaskGroup.Build,
2174
>
isBackground: isBackground,
2175
>
problemMatchers: matchers
2176
>
}
2177
>
);
2178
>
const taskGroupKind = GroupKind.from(fileConfig.group);
2179
>
if (taskGroupKind !== undefined) {
2180
task.configurationProperties.group = taskGroupKind;
2182
task.configurationProperties.group = undefined;
2183
}
2185
>
CustomTask.fillDefaults(task, context);
2186
>
result.custom = [task];
2187
>
}
2188
result.custom = result.custom || [];
2189
result.configured = result.configured || [];