Skip to content

Commit

Permalink
fix: allow tasks with schemas not to have options provided in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
apaleslimghost committed Apr 24, 2024
1 parent cf1e999 commit ae093bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/cli/src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ const loadTasks = async (

return taskResult.map((Task) => {
const taskSchema = TaskSchemas[taskId as keyof TaskOptions]
const parsedOptions = taskSchema
? taskSchema.parse({ ...config.taskOptions[taskId].options, ...options })
: {}
const configOptions = config.taskOptions[taskId]?.options ?? {}
const parsedOptions = taskSchema ? taskSchema.parse({ ...configOptions, ...options }) : {}

const task = new (Task as unknown as TaskConstructor)(
logger,
Expand Down

0 comments on commit ae093bd

Please sign in to comment.