ci: suppress dep trees by default in `ci/do-audit.sh` (#30255)

get them back by passing `--display-dependency-trees`
This commit is contained in:
Trent Nelson 2023-02-10 21:47:48 -07:00 committed by GitHub
parent d49b48100d
commit 85af23613e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,16 @@ src_root="$(readlink -f "${here}/..")"
cd "${src_root}"
# `cargo-audit` doesn't give us a way to do this nicely, so hammer it is...
dep_tree_filter="grep -Ev '│|└|├|─'"
while [[ -n $1 ]]; do
if [[ $1 = "--display-dependency-trees" ]]; then
dep_tree_filter="cat"
shift
fi
done
cargo_audit_ignores=(
# Potential segfault in the time crate
#
@ -19,4 +29,4 @@ cargo_audit_ignores=(
# https://github.com/solana-labs/solana/issues/29586
--ignore RUSTSEC-2023-0001
)
scripts/cargo-for-all-lock-files.sh audit "${cargo_audit_ignores[@]}"
scripts/cargo-for-all-lock-files.sh audit "${cargo_audit_ignores[@]}" | $dep_tree_filter