Flag `--panicOnWarning` ignored with some warnings

Inside the release notes for hugo version 0.92.0, I can find this paragraph:

Note that the `--panicOnWarning` flag is a new flag in this release and works for all
warnings – it will fail fast on the first warning and point to the line in question.
This makes it much easier to pin-point the location.

This flag does does work for me with all warnings, and this comment suggests that I’m not the only one.

How to reproduce:

git clone -n https://github.com/google/docsy
cd docsy/
git checkout d3ad0fd63ec73820f2a142ef367cc81ca2a89e79

Now serve the site user guide of this repo:

cd userguide/
npm run serve

Hugo serves the site and issues a warning:

Start building sites …
hugo v0.92.2-CDF6A0D6+extended windows/amd64 BuildDate=2022-02-11T14:17:39Z VendorInfo=gohugoio
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.

                   | EN
-------------------+-----
  Pages            | 63
  Paginator pages  |  0
  Non-page files   |  4
  Static files     | 48
  Processed images |  5
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

I want to know the origin of the warning so I’m issueing:

hugo --panicOnWarning serve --themesDir ../..

Expected behaviour: hugo panics on first warning, showing a stack trace that makes it easier to track down the origin of the warning.

Actual behaviour: flag --panicOnWarning is ignore, hugo doesn’t panic but serves the site

Or maybe my expectations against the flag --panicOnWarning are wrong?

It could be that it’s just an issue with the order of your command. The actual server command is hugo serve, not hugo some parameters serve some other parameters. Those parameters (everything starting with double dashes) goes BEHIND the command.

No, order of commands doesnt’t make any difference, tried that already before.