ci(test-quickget): use wc -l to count test results

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-23 18:18:36 +00:00 committed by Martin Wimpress
parent a4d8329ba7
commit 9073738ade
1 changed files with 4 additions and 4 deletions

View File

@ -52,10 +52,10 @@ jobs:
mkdir -p results
./quickget --check "${{ matrix.distro }}" | tee results/check.txt
# Count results (handle grep returning 1 when no matches)
PASSED=$(grep -c '^PASS' results/check.txt || echo 0)
FAILED=$(grep -c '^FAIL' results/check.txt || echo 0)
SKIPPED=$(grep -c '^SKIP' results/check.txt || echo 0)
# Count results (use wc -l to avoid grep exit code issues)
PASSED=$(grep '^PASS' results/check.txt | wc -l | tr -d ' ')
FAILED=$(grep '^FAIL' results/check.txt | wc -l | tr -d ' ')
SKIPPED=$(grep '^SKIP' results/check.txt | wc -l | tr -d ' ')
echo "passed=${PASSED}" >> "$GITHUB_OUTPUT"
echo "failed=${FAILED}" >> "$GITHUB_OUTPUT"