Skip to content

Raise error if postprocessing fails

Evan Read requested to merge eread/raise-error-if-postprocessing-fails into main

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:

  1. On main branch, modify rollup.config.js to make it syntactically incorrect.
  2. Run bundle exec nanoc compile. The compilation fails.
  3. Run echo $?. A return code of 0 should be returned. That's a success code.
  4. Checkout this feature branch. Modify rollup.config.js to make it syntactically incorrect.
  5. Run bundle exec nanoc compile. The compilation fails.
  6. Run echo $?. A return code of 1 should be returned. That's a failure code.

CC @sarahgerman @oregand @phillipwells

Edited by Evan Read

Merge request reports

Loading