From 4cb69409e7ed433b2b3e9be5c3424d29f1c19508 Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Fri, 2 Sep 2022 17:38:17 +0900 Subject: [PATCH 1/2] Modify help msg if invalid input --- src/fosslight_scanner/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fosslight_scanner/cli.py b/src/fosslight_scanner/cli.py index d7c1b7d..43ba49c 100644 --- a/src/fosslight_scanner/cli.py +++ b/src/fosslight_scanner/cli.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022 LG Electronics Inc. # SPDX-License-Identifier: Apache-2.0 +import sys from argparse import ArgumentParser from ._help import print_help_msg from .fosslight_scanner import run_main, PKG_NAME @@ -28,7 +29,7 @@ def main(): try: args = parser.parse_args() except SystemExit: - print_help_msg() + sys.exit(0) if args.help: print_help_msg() From 8b61a4e504450f7fbab6df6181cfec6b725975a9 Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Mon, 5 Sep 2022 08:58:29 +0900 Subject: [PATCH 2/2] Set All mode to the default mode in help msg --- README.md | 3 ++- src/fosslight_scanner/_help.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a73d5a1..11be308 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,12 @@ fosslight [Mode] [option1] [option2] ... ### Parameters Mode ``` + all Run all scanners (Default) source Run FOSSLight Source dependency Run FOSSLight Dependency binary Run FOSSLight Binary prechecker Run FOSSLight Prechecker - all Run all scanners + compare Compare two FOSSLight reports ``` Options: ``` diff --git a/src/fosslight_scanner/_help.py b/src/fosslight_scanner/_help.py index 04cd265..cf45b56 100644 --- a/src/fosslight_scanner/_help.py +++ b/src/fosslight_scanner/_help.py @@ -13,12 +13,12 @@ Parameters: Mode + all\t\t\t Run all scanners(Default) source\t\t Run FOSSLight Source dependency\t\t Run FOSSLight Dependency binary\t\t Run FOSSLight Binary prechecker\t\t Run FOSSLight Prechecker - all\t\t\t Run all scanners - compare\t\t Compare two FOSSLight reports in yaml format + compare\t\t Compare two FOSSLight reports Options: -h\t\t\t Print help message