prismicio / prismic-ts-codegen

A Prismic model-to-TypeScript-type generator.
Apache License 2.0
18 stars 6 forks source link

fix(cli): exit with non-zero error code when CLI has errors #61

Closed ck-maciek closed 1 year ago

ck-maciek commented 1 year ago

Allow other tools calling prismic-ts-codegen to detect errors by returning non-zero exit code from the process when errors occur.

Types of changes

Description

The change signals a non-zero exit code (1) when prismic-ts-codegen execution end with an error. Currently if the tool is used in an automated build process, there is no way to interrupt the build other than scanning stdout for errors.

Using a non-zero code is a standard practice allowing other tools to detect failure scenarios.

Checklist:

image

angeloashmore commented 1 year ago

Thanks @ck-maciek! I'll publish this shortly.

angeloashmore commented 1 year ago

Published in v0.1.19! 🎉