Skip to content

Commit ce34c0b

Browse files
author
Steven Petryk
authored
fix(cli): return a non-zero exit code on failure (#11)
Previously, this script would silently fail when an error was encountered. This breaks builds. Now, it will return an exit code of 1 when an error is encountered. BREAKING CHANGE: This may lead to builds that previously succeeded breaking. This would mean that there was previously an uncaught error in your setup. Well-configured, healthy builds should remain unaffected.
1 parent a982c1f commit ce34c0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/contentful-typescript-codegen.ts

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ async function runCodegen(outputFile: string) {
6767

6868
runCodegen(cli.flags.output).catch(error => {
6969
console.error(error)
70+
process.exit(1)
7071
})
7172

7273
if (cli.flags.poll) {

0 commit comments

Comments
 (0)