-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Hugo should exit with an error code in case of errors when building a website #740
Comments
Agree, but a note on the above error. This is related to the discussion near the end here: |
Good to know where this bug comes from. Thanks for letting me know! |
It seems like there are two solutions to this problem:
Number 2 is certainly the easiest solution, but it would necessitate an issue there. Thoughts? |
+1. Critical IMO: finding potential 404 and so on ahead of deployment is certainly one pros of SSG. It would be great to have that. |
I think this situation should be better after: |
Is there any update on this? I want to update my page automatically via travis on every commit. But travis looks only at the exit status, so it happily deploys it even if many errors occured. |
@phil-opp see my last comment. What errors do you see that doesn't exit != 0 ? |
Links to non-existing pages:
|
The use case in Hugo is to exit with an error code when *any* ERROR logging has occured. See gohugoio/hugo#740
This should help fix this: /cc @spf13 |
The use case in Hugo is to exit with an error code when *any* ERROR logging has occured. See gohugoio/hugo#740
The use case in Hugo is to exit with an error code when *any* ERROR logging has occured. See gohugoio/hugo#740
The maintainer of the log library we use seems to have abandoned it, so I have given up on that approach. I may revisit this later. |
Isn't it owned by the same owner as hugo? |
Yes ... or: The Hugo contributors owns Hugo. |
The use case in Hugo is to exit with an error code when *any* ERROR logging has occured. See gohugoio/hugo#740
Thanks a lot! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
To help notify the user of problems when Hugo is run as an automated script on the web server, I think Hugo should exit with an error code if there are warnings/errors when building a website.
For example, due to a bug either in Hugo docs or in the source code, some error messages are displayed during a
hugo
run:The fact that the above returns an error code of 0 means that most automatic deployment scripts (except the really smart ones who grep strings like
ERROR
andWARNING
in thehugo
output) would fail to detect any errors, leaving potential build problems undetected.The text was updated successfully, but these errors were encountered: