Skip to content

Commit 805c423

Browse files
authored
Modify help msg if invalid input
1 parent eb19d6f commit 805c423

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ fosslight [Mode] [option1] <arg1> [option2] <arg2>...
6262
### Parameters
6363
Mode
6464
```
65+
all Run all scanners(Default)
6566
source Run FOSSLight Source
6667
dependency Run FOSSLight Dependency
6768
binary Run FOSSLight Binary
6869
prechecker Run FOSSLight Prechecker
69-
all Run all scanners
7070
compare Compare two FOSSLight reports
7171
```
7272
Options:

src/fosslight_scanner/_help.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1414
Parameters:
1515
Mode
16+
all\t\t\t Run all scanners(Default)
1617
source\t\t Run FOSSLight Source
1718
dependency\t\t Run FOSSLight Dependency
1819
binary\t\t Run FOSSLight Binary

src/fosslight_scanner/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2022 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5+
import sys
56
from argparse import ArgumentParser
67
from ._help import print_help_msg
78
from .fosslight_scanner import run_main, PKG_NAME
@@ -28,7 +29,7 @@ def main():
2829
try:
2930
args = parser.parse_args()
3031
except SystemExit:
31-
print_help_msg()
32+
sys.exit(0)
3233

3334
if args.help:
3435
print_help_msg()

0 commit comments

Comments
 (0)