Raise error if postprocessing fails
This MR adds error raising that should've made: !2895 (merged) unnecessary because the bug couldn't be introduced in the first place.
In a pipeline, the error doesn't cause a return code of 1 to be returned to the caller. Adding raise
causes the return code of 1
if system
has a failure, which should be caught in CI/CD pipelines.
To test:
- On
main
branch, modifyrollup.config.js
to make it syntactically incorrect. - Run
bundle exec nanoc compile
. The compilation fails. - Run
echo $?
. A return code of0
should be returned. That's a success code. - Checkout this feature branch. Modify
rollup.config.js
to make it syntactically incorrect. - Run
bundle exec nanoc compile
. The compilation fails. - Run
echo $?
. A return code of1
should be returned. That's a failure code.
Edited by Evan Read