jekyll: Jekyll exits with 0 when a build fails
So I created a post something like the following:
---
layout: post
title: Something: Something else
---
...
jekyll build
fails when parsing the title. However, it fails with exit code 0.
Generating...
Error: could not read file ...: (<unknown>): mapping values are not allowed in this context at line 3 column 21
done in 1.752 seconds.
This is really bad behaviour as it means, for example, a CI build will pass despite it failing. Leaves the whole thing in a broken state.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (9 by maintainers)
There is no problem here as the behavior is exactly right, and expected. You did not receive a fatal error. Jekyll continued to process what it could and completed it’s processing as per normal and exited with status 0 as you can see with the “done in n” under the error. We only throw on fatal errors and the inability to process a file is not fatal to us so we processed what we could and gave you the error so that you could fix it.