Skip to content
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

Add a --panicOnWarning flag #9357

Closed
bep opened this issue Jan 6, 2022 · 2 comments · Fixed by #9360
Closed

Add a --panicOnWarning flag #9357

bep opened this issue Jan 6, 2022 · 2 comments · Fixed by #9360
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Jan 6, 2022

This issue is especially targeted at deprecation warnings. These textual references without a file/template context (filename, line number) is sometimes very hard to debug. It would be much nicer if I could do hugo server --panicOnWarning and just iterate until the warnings go away.

We should also print that flag as part of the deprecation message.

/cc @jmooring

@bep bep added the Enhancement label Jan 6, 2022
@bep bep added this to the v0.92.0 milestone Jan 6, 2022
@bep bep self-assigned this Jan 6, 2022
@bep bep changed the title Add a --panicOnWarning and --panicOnError flag Add a --panicOnWarning flag Jan 6, 2022
bep added a commit to bep/hugo that referenced this issue Jan 6, 2022
bep added a commit to bep/hugo that referenced this issue Jan 6, 2022
@bep bep closed this as completed in #9360 Jan 6, 2022
bep added a commit that referenced this issue Jan 6, 2022
@carlinmack
Copy link

carlinmack commented Jan 12, 2022

Perhaps intentional but this flag does not panic on WARN

hugo --panicOnWarning
Start building siteshugo v0.92.0-B3549403+extended linux/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio
WARN 2022/01/12 23:07:10 .File.TranslationBaseName on zero object. Wrap it in if or with: {{ with .File }}{{ .TranslationBaseName }}{{ end }}

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants