-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed rendering under "vuepress build" produces exit code 0 #570
Comments
We also stumbled over this problem during a continuous deployment process. Seems to be the same as #598 If needed, I can create you a reproduction repo later on. However, the main issue is that errors in // render pages
logger.wait('Rendering static HTML...')
for (const page of options.siteData.pages) {
await renderPage(page)
} are catched in wrapCommand(build)(path.resolve(dir), { debug, outDir })
// [...]
function wrapCommand (fn) {
return (...args) => {
return fn(...args).catch(err => {
console.error(chalk.red(err.stack))
})
}
} which ultimately returns 0 as exit code. Adding However, Do we need to differentiate between these two commands, or is it sufficient to add |
Bug report
Seems that any errors during the rendering phase still reports exit code 0. Output won't have pages generated but vuepress reports exit code 0. Hard to detect issues and fail early under automated buids.
Version
0.10.0
Steps to reproduce
Put wrong, non-existing links to sidebar section in config.js to fail the rendering phase:
Let' run this:
Output:
What is expected?
vuepress build returns correct exit code on success/failure so that further automation is possible.
What is actually happening?
vuepress build returns incorrect exit code on success/failure so that further automation is not possible.
Other relevant information
The text was updated successfully, but these errors were encountered: