diff --git a/core/cli/src/tasks.ts b/core/cli/src/tasks.ts index a53825245..81f5cebb9 100644 --- a/core/cli/src/tasks.ts +++ b/core/cli/src/tasks.ts @@ -56,9 +56,7 @@ const loadTasks = async ( return reduceValidated(taskResults) } -export async function runTasks(logger: Logger, commands: string[], files?: string[]): Promise { - const config = await loadConfig(logger) - +export async function runTasksFromConfig(logger: Logger, config: ValidConfig, commands: string[], files?: string[]): Promise { for (const pluginOptions of Object.values(config.pluginOptions)) { if (pluginOptions.forPlugin) { setOptions(pluginOptions.forPlugin.id as OptionKey, pluginOptions.options) @@ -131,3 +129,9 @@ ${error.details}` } } } + +export async function runTasks(logger: Logger, commands: string[], files?: string[]): Promise { + const config = await loadConfig(logger) + + return runTasksFromConfig(logger, config, commands, files) +}