fix(ci): Handle new cargo machete output format for unused dependencies (#7724)

This commit is contained in:
teor 2023-10-11 10:33:01 +10:00 committed by GitHub
parent 59ea5f1693
commit 1fb2fd2a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -312,8 +312,9 @@ jobs:
echo "-- full cargo machete output, including ignored dependencies --"
cargo machete --skip-target-dir || true
echo "-- unused dependencies are below this line, full output is above --"
if (cargo machete --skip-target-dir 2>/dev/null || true) | \
grep -v -e gumdrop -e humantime-serde -e tinyvec -e zebra-utils -e "found the following" -e Cargo.toml -e Done; then
if cargo machete --skip-target-dir 2>/dev/null | \
grep --extended-regexp -e '^\\t' | \
grep -v -e gumdrop -e humantime-serde -e tinyvec -e zebra-utils; then
echo "New unused dependencies were found, please remove them!"
exit 1
else