1597
}
1598
default: {
1599
>
taskSource = { kind: Tasks.TaskSourceKind.Workspace, config: { index, element: external, file: '.vscode/tasks.json', workspaceFolder: context.workspaceFolder }, label };
taskConfiguration.ts
1600
>
break;
1601
>
}
1602
}
1604
>
const result: Tasks.CustomTask = new Tasks.CustomTask(
1605
>
context.uuidMap.getUUID(taskName),
1606
>
taskSource,
1607
>
taskName,
1608
>
Tasks.CUSTOMIZED_TASK_TYPE,
1609
>
undefined,
1610
>
false,
1611
>
RunOptions.fromConfiguration(external.runOptions),
1612
>
{
1613
>
name: taskName,
1614
>
identifier: taskName,
1615
>
}
1616
>
);
1617
>
const configuration = ConfigurationProperties.from(external as IConfigurationProperties & { [key: string]: unknown }, context, false, source);
1618
>
result.addTaskLoadMessages(configuration.errors);
1619
>
if (configuration.value) {
1620
>
result.configurationProperties = Object.assign(result.configurationProperties, configuration.value);
1621
>
}
1622
>
const supportLegacy: boolean = true; //context.schemaVersion === Tasks.JsonSchemaVersion.V2_0_0;
1623
>
if (supportLegacy) {
1624
>
const legacy: ILegacyTaskProperties = external as ILegacyTaskProperties;
1625
>
if (result.configurationProperties.isBackground === undefined && legacy.isWatching !== undefined) {
1626
result.configurationProperties.isBackground = !!legacy.isWatching;
1627
}
1629
>
if (legacy.isBuildCommand === true) {
1630
result.configurationProperties.group = Tasks.TaskGroup.Build;
1632
result.configurationProperties.group = Tasks.TaskGroup.Test;
1633
}
1635
>
}
1636
>
const command: Tasks.ICommandConfiguration = CommandConfiguration.from(external, context)!;
1637
>
if (command) {
1638
result.command = command;
1639
}
1641
// if the task has its own command then we suppress the
1642
// task name by default.
1643
command.suppressTaskName = true;
1644
}
1646
}
1647