Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fosslight_source/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
-t <float>\t\t Stop scancode scanning if scanning takes longer than a timeout in seconds.
-c <core>\t\t Select the number of cores to be scanned with ScanCode.
--no_correction\t Enter if you don't want to correct OSS information with sbom-info.yaml
--correct_fpath\t Path to the sbom-info.yaml file"""
--correct_fpath <path> Path to the sbom-info.yaml file"""


def print_version(pkg_name):
Expand Down
5 changes: 4 additions & 1 deletion src/fosslight_source/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def main():
format = ""
selected_scanner = ""
correct_mode = True
correct_filepath = os.getcwd()

scanned_result = []
license_list = []
Expand Down Expand Up @@ -91,6 +90,7 @@ def main():
selected_scanner = ''.join(args.scanner)
if args.no_correction:
correct_mode = False
correct_filepath = path_to_scan
if args.correct_fpath:
correct_filepath = ''.join(args.correct_fpath)

Expand Down Expand Up @@ -160,6 +160,9 @@ def create_report_file(_start_time, scanned_result, license_list, selected_scann
else:
output_path = os.path.abspath(output_path)

if not correct_filepath:
correct_filepath = path_to_scan

if output_file == "":
if output_extension == _json_ext:
output_file = f"fosslight_opossum_src_{_start_time}"
Expand Down
3 changes: 3 additions & 0 deletions src/fosslight_source/run_scancode.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def run_scan(path_to_scan, output_file_name="",
_json_ext = ".json"
_start_time = datetime.now().strftime('%y%m%d_%H%M')

if not correct_filepath:
correct_filepath = path_to_scan

success, msg, output_path, output_file, output_extension = check_output_format(output_file_name, format)
if success:
if output_path == "": # if json output with _write_json_file not used, output_path won't be needed.
Expand Down