Skip to content

Commit 400c47d

Browse files
committed
Change the default path to find sbom-info.yaml
Signed-off-by: Jiyeong Seok <[email protected]>
1 parent 521c00e commit 400c47d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/fosslight_source/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def main():
4949
format = ""
5050
selected_scanner = ""
5151
correct_mode = True
52-
correct_filepath = os.getcwd()
5352

5453
scanned_result = []
5554
license_list = []
@@ -91,6 +90,7 @@ def main():
9190
selected_scanner = ''.join(args.scanner)
9291
if args.no_correction:
9392
correct_mode = False
93+
correct_filepath = path_to_scan
9494
if args.correct_fpath:
9595
correct_filepath = ''.join(args.correct_fpath)
9696

@@ -160,6 +160,9 @@ def create_report_file(_start_time, scanned_result, license_list, selected_scann
160160
else:
161161
output_path = os.path.abspath(output_path)
162162

163+
if not correct_filepath:
164+
correct_filepath = path_to_scan
165+
163166
if output_file == "":
164167
if output_extension == _json_ext:
165168
output_file = f"fosslight_opossum_src_{_start_time}"

src/fosslight_source/run_scancode.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def run_scan(path_to_scan, output_file_name="",
3838
_json_ext = ".json"
3939
_start_time = datetime.now().strftime('%y%m%d_%H%M')
4040

41+
if not correct_filepath:
42+
correct_filepath = path_to_scan
43+
4144
success, msg, output_path, output_file, output_extension = check_output_format(output_file_name, format)
4245
if success:
4346
if output_path == "": # if json output with _write_json_file not used, output_path won't be needed.

0 commit comments

Comments
 (0)