From 2950546c0df7af7e0a28112f5ad35f6e3b52b88c Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Tue, 18 Oct 2022 19:59:12 +0900 Subject: [PATCH] Fix bug that doesn't work -v, -h option --- src/fosslight_prechecker/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fosslight_prechecker/cli.py b/src/fosslight_prechecker/cli.py index 0930fe2..bf97c2a 100644 --- a/src/fosslight_prechecker/cli.py +++ b/src/fosslight_prechecker/cli.py @@ -14,7 +14,7 @@ def main(): parser = argparse.ArgumentParser(description='FOSSLight Prechecker', prog='fosslight_prechecker', add_help=False) - parser.add_argument('mode', help='lint | convert | add', choices=['lint', 'add', 'convert']) + parser.add_argument('mode', nargs='?', help='lint | convert | add', choices=['lint', 'add', 'convert']) parser.add_argument('-h', '--help', help='Print help message', action='store_true', dest='help') parser.add_argument('-i', '--ignore', help='Do not write log to file', action='store_false', dest='log') parser.add_argument('-v', '--version', help='Print FOSSLight Prechecker version', action='store_true', dest='version')