microsoft / knack

Knack - A Python command line interface framework
https://pypi.python.org/pypi/knack
MIT License
348 stars 95 forks source link

Fix `--only-show-errors` on root parser #253

Closed jiasli closed 2 years ago

jiasli commented 2 years ago

--only-show-errors doesn't work on root parser:

> python .\examples\exapp2 --only-show-errors
usage: exapp2 [-h] [--verbose] [--debug] [--only-show-errors] [--output {json,jsonc,yaml,yamlc,table,tsv,none}]
              [--query JMESPATH]
              {hello,sample-json,sample-logger,abc,ga,pre,exp,dep,demo} ...
exapp2: error: the following arguments are required: _command

This is due to a typo made by #179. Now fix it.