From 1fb2fd2a50dd8132f7185c33c21bc9122e68926c Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 11 Oct 2023 10:33:01 +1000 Subject: [PATCH] fix(ci): Handle new cargo machete output format for unused dependencies (#7724) --- .github/workflows/continous-integration-os.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continous-integration-os.yml b/.github/workflows/continous-integration-os.yml index c23294f9..63e70064 100644 --- a/.github/workflows/continous-integration-os.yml +++ b/.github/workflows/continous-integration-os.yml @@ -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