diff --git a/packages/eas-build-job/src/step.ts b/packages/eas-build-job/src/step.ts index a62b8cd5..afdb71fa 100644 --- a/packages/eas-build-job/src/step.ts +++ b/packages/eas-build-job/src/step.ts @@ -127,19 +127,14 @@ export const ShellStepZ = CommonStepZ.extend({ */ outputs: z .array( - z.preprocess( - (input) => { - // We allow a shorthand for outputs - if (typeof input === 'string') { - return { name: input, required: false }; - } - return input; - }, + z.union([ + // We allow a shorthand for outputs + z.string().transform((name) => ({ name, required: false })), z.object({ name: z.string(), required: z.boolean().optional(), - }) - ) + }), + ]) ) .optional(),