Closed Martchus closed 3 years ago
I guess this commit causes the problem: https://github.com/mojolicious/mojo/commit/d0093749c73557bf0be66f76f541749667d04511
Ironically, you introduced it because I was asking for it and it actually works to detect invalid arguments. The only problem is that it also considers --help
or help
invalid.
Yes, this is a bug and needs to be fixed.
By the way, I've already added a workaround for openQA. So at least for us there's no need to rush it. (Better do the improvement right this time.)
I'm surprised that we don't have a test case yet for mojo help
. Will have to add one with the fix. Probably because unlike other commands, which are real modules, it's just an if
block in Mojolicious::Commands
.
Steps to reproduce the behavior
mojo help
Expected behavior
List available commands with short descriptions (according to https://docs.mojolicious.org/Mojolicious/Commands#help) and a zero return code. It would also be nice if
--help
would work (and not justhelp
without dashes).Actual behavior
Invalid command "help".
is printed with return code 2.