Skip to content

Commit 10c94f7

Browse files
committed
Fix to print help message if don't write mode
1 parent 3dc4e55 commit 10c94f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fosslight_reuse/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
def main():
1313
parser = argparse.ArgumentParser(description='FOSSLight Reuse', prog='fosslight_reuse', add_help=False)
14-
parser.add_argument('mode', help='lint | convert | add')
14+
parser.add_argument('mode', nargs='?', help='lint | convert | add', default="")
1515
parser.add_argument('--path', '-p', help='Path to check', type=str, dest='path', default="")
1616
parser.add_argument('--file', '-f', help='Files to check', type=str, dest='file', default="")
1717
parser.add_argument('--output', '-o', help='Output file name', type=str, dest='output', default="")
@@ -34,7 +34,7 @@ def main():
3434
elif args.mode == "add":
3535
add_content(args.path, args.file, args.license, args.copyright)
3636
else:
37-
pass
37+
print_help_msg()
3838

3939

4040
if __name__ == "__main__":

0 commit comments

Comments
 (0)