grapesjs-cli
grapesjs-cli copied to clipboard
Failing webpack/declaration build does not cause cli process to exit with non-zero code
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 theerrors
variable has a truthy value, add code to callprocess.exit
with a non-zero code.