diff --git a/core/cli/src/tasks.ts b/core/cli/src/tasks.ts index dc63d85b8..a6d1428b6 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) @@ -126,3 +124,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) +}