Vulnerability scanning print failed command in case of error (flutter/engine#42190)
The 3p deps vulnerability scanner currently isn't providing helpful output in the case of errors during the processing of the dependencies. This change adds outputting which command caused the error, and conditionally add error output to help aid any changes that need to be made to the dependencies. *List which issues are fixed by this PR. You must list at least one issue.* b/282959127 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -236,7 +236,13 @@ def get_common_ancestor_commit(dep, deps_list):
|
||||
print('Ancestor commit: ' + ancestor_commit)
|
||||
return ancestor_commit
|
||||
except subprocess.CalledProcessError as error:
|
||||
print("Subprocess error '{0}' occured.".format(error.output))
|
||||
print(
|
||||
"Subprocess command '{0}' failed with exit code: {1}.".format(
|
||||
error.cmd, str(error.returncode)
|
||||
)
|
||||
)
|
||||
if error.output:
|
||||
print("Subprocess error output: '{0}'".format(error.output))
|
||||
return {}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user