Closed
Description
Description
the root cause of this issue is that argparse raises a different exception on Python 3.9. this also break our test cases
Steps to reproduce
git clone
this projectpoetry env use 3.9
poetry run cz c nocommand
Current behavior
$ poetry run cz nocommand
usage: cz [-h] [--debug] [-n NAME] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ...
cz: error: argument {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version}: invalid choice: 'nocommand' (choose from 'init', 'commit', 'c', 'ls', 'example', 'info', 'schema', 'bump', 'changelog', 'ch', 'check', 'version')
Desired behavior
warn "Command is required" at the end
poetry run cz nocommand
usage: cz [-h] [--debug] [-n NAME] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ...
cz: error: argument {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version}: invalid choice: 'nocommand' (choose from 'init', 'commit', 'c', 'ls', 'example', 'info', 'schema', 'bump', 'changelog', 'ch', 'check', 'version')
Command is required
Environment
- commitizen version: 2.18.1
- python version: Python 3.9.7
- operating system: Darwin