Skip to content

Commit ca0559e

Browse files
authored
Merge pull request #52 from fosslight/develop
Fix the output file msg if nothing scanned
2 parents 5879c34 + caa68b0 commit ca0559e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fosslight_scanner/fosslight_scanner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False,
197197
remove_src_data, default_oss_name, url)
198198

199199
if success:
200-
result_log["Output File"] = final_report
200+
if os.path.isfile(final_report):
201+
result_log["Output File"] = final_report
202+
else:
203+
result_log["Output File"] = 'Nothing is detected from the scanner so output file is not generated.'
201204
else:
202205
logger.error(f"Fail to generate a result file({final_report}): {err_msg}")
203206

0 commit comments

Comments
 (0)