grapesjs-cli icon indicating copy to clipboard operation
grapesjs-cli copied to clipboard

Failing webpack/declaration build does not cause cli process to exit with non-zero code

Open joeldentici opened this issue 1 year ago • 0 comments

We noticed when the webpack build fails or the typescript declaration emitting step fails, the cli process does not exit with a non-zero code. This is problematic in a CI context as the CI pipeline will continue running the next steps in the job/next job as it doesn't detect the failure.

The following updates should probably be made:

  • Catch errors thrown by buildDeclaration
  • If an error is caught by buildDeclaration or the errors variable has a truthy value, add code to call process.exit with a non-zero code.

joeldentici avatar Feb 23 '24 00:02 joeldentici