Debugs Flaky License dependency Reports generation (#12744)

* Surfaces mvn command output in case of failure.

* formats output

* nit
This commit is contained in:
Tejaswini Bandlamudi 2022-07-11 14:35:34 +05:30 committed by GitHub
parent 864b77e91a
commit 32946216d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ def generate_report(module_path, report_orig_path, report_out_path):
command = "cp -r {} {}".format(report_orig_path, report_out_path) command = "cp -r {} {}".format(report_orig_path, report_out_path)
subprocess.check_output(command, cwd=module_path, shell=True) subprocess.check_output(command, cwd=module_path, shell=True)
print("Generated report for {} in {}".format(module_path, report_out_path)) print("Generated report for {} in {}".format(module_path, report_out_path))
except subprocess.CalledProcessError as e:
print("Encountered error [{}] with the following output when generating report for {}".format(e, module_path))
print(e.output.decode('utf-8'))
except Exception as e: except Exception as e:
print("Encountered error [{}] when generating report for {}".format(e, module_path)) print("Encountered error [{}] when generating report for {}".format(e, module_path))