Skip to content

Commit 5b169b0

Browse files
committed
Run current path if no input path
1 parent 0f4f436 commit 5b169b0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/fosslight_oss_pkg/_convert.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ def convert_report(base_path, output_name, format, need_log_file=True, sheet_nam
8080
logger.error(f"Format error - {msg}")
8181
sys.exit(1)
8282

83-
if base_path == "":
84-
base_path = output_path
85-
8683
if os.path.isdir(base_path):
8784
oss_yaml_files = find_sbom_yaml_files(base_path)
8885
if oss_yaml_files:

src/fosslight_prechecker/_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Options:
2121
-h\t\t\t Print help message
2222
-v\t\t\t Print FOSSLight Prechecker version
23-
-p <path>\t\t Path to check
23+
-p <path>\t\t Path to check(Default: current directory)
2424
-f <format>\t\t Result format(yaml, xml, html)
2525
-o <file_name>\t Output file name
2626
-n\t\t\t Don't exclude venv*, node_modules, and .*/ from the analysis

src/fosslight_prechecker/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: GPL-3.0-only
55
import argparse
66
import sys
7+
import os
78
from fosslight_util.help import print_package_version
89
from fosslight_prechecker._help import print_help_msg
910
from fosslight_prechecker._precheck import run_lint, PKG_NAME
@@ -36,6 +37,9 @@ def main():
3637
print_package_version(PKG_NAME, "FOSSLight Prechecker Version")
3738
sys.exit(0)
3839

40+
if not args.path:
41+
args.path = os.getcwd()
42+
3943
if args.mode == "lint":
4044
run_lint(args.path, args.disable, args.output, args.format, args.log)
4145
elif args.mode == "convert":

0 commit comments

Comments
 (0)