Skip to content

Commit e5263d2

Browse files
authored
Merge pull request #143 from fosslight/compare
Fix the compare output bug
2 parents bd7cda7 + f7ce3e6 commit e5263d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fosslight_scanner/fosslight_scanner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
fosslight_source_installed = False
4444

4545
OUTPUT_REPORT_PREFIX = "fosslight_report_all_"
46+
COMPARE_OUTPUT_REPORT_PREFIX = "fosslight_compare_"
4647
PKG_NAME = "fosslight_scanner"
4748
logger = logging.getLogger(constant.LOGGER_NAME)
4849
warnings.simplefilter(action='ignore', category=FutureWarning)
@@ -426,7 +427,8 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
426427
logger.error("(compare mode) Cannot find after FOSSLight report file (2nd param with -y option).")
427428
return False
428429
ret, final_excel_dir, result_log = init(output_path)
429-
430+
if not output_files:
431+
output_files = [COMPARE_OUTPUT_REPORT_PREFIX + _start_time]
430432
run_compare(os.path.join(_executed_path, before_comp_f), os.path.join(_executed_path, after_comp_f),
431433
final_excel_dir, output_files, output_extensions, _start_time, _output_dir)
432434
else:

0 commit comments

Comments
 (0)