Skip to content

Commit

Permalink
chore(codegen): add enforceRequriedFields to spinner output (#6163)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgulseth authored Apr 2, 2024
1 parent 74a7a75 commit b68e650
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/sanity/src/_internal/cli/actions/schema/extractAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,18 @@ export default async function extractAction(

trace.complete()

spinner.succeed('Extracted schema')
spinner.succeed(
enforceRequiredFields
? 'Extracted schema, with enforced required fields'
: 'Extracted schema',
)
} catch (err) {
trace.error(err)
spinner.fail('Failed to extract schema')
spinner.fail(
enforceRequiredFields
? 'Failed to extract schema, with enforced required fields'
: 'Failed to extract schema',
)
throw err
}
}

0 comments on commit b68e650

Please sign in to comment.