diff --git a/py/plugins/snyk.py b/py/plugins/snyk.py index 54ca728..c421f47 100644 --- a/py/plugins/snyk.py +++ b/py/plugins/snyk.py @@ -184,8 +184,9 @@ def scan_hook(results, mock, props): if ec == 3: # If there are no supported project, we return no results but no crash. results.print_with_ts("snyk-code: no supported project for Snyk") - # If no supported project, no results file is generated + # If no supported project, no results file is generated and no stats are generated props.copy_out_files.remove(SNYK_OUTPUT) + props.post_process_hooks.remove(write_snyk_stats_metadata) return 0 if ec not in [0, 1]: results.error("snyk code returned unexpected exit status: %d" % ec, ec=ec)