Skip to content

Version 1.4.2

Choose a tag to compare

@jwaldrip jwaldrip released this 19 Oct 17:11
· 78 commits to master since this release

_kudos to @dcarley:_

The default for ErrorHandling was changed from ContinueOnError to
PanicOnError 8c20e9b. However this didn't apply to sub-commands, which
continued to use ContinueOnError and would execute the sub-command
function (in addition to printing the usage message) when not passed
mandatory arguments.

Fix this by copying ErrorHandling from the parent when adding a new
sub-command. The additional test asserts that the sub-command raises a panic
and doesn't execute it's contents when it doesn't receive the correct number
of arguments. Mute is required to prevent the help message being printed
during the tests.