fix: bug: dev-agent.sh line 272 — grep -c ... || echo 0 produces 0n0 and breaks arithmetic (#574)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

This commit is contained in:
Claude 2026-04-10 12:45:24 +00:00
parent 1499eb04df
commit 2b7edfaf1a
2 changed files with 6 additions and 2 deletions

View file

@ -122,7 +122,8 @@ PAGES=$(printf '%s\n' "$PARSED" | jq -c '
')
TOTAL_REQUESTS=$(printf '%s\n' "$PARSED" | wc -l | tr -d ' ')
PAGE_VIEWS=$(printf '%s\n' "$PAGES" | grep -c . || echo 0)
PAGE_VIEWS=$(printf '%s\n' "$PAGES" | grep -c . || true)
PAGE_VIEWS="${PAGE_VIEWS:-0}"
UNIQUE_VISITORS=$(printf '%s\n' "$PAGES" | jq -r '.ip' | sort -u | wc -l | tr -d ' ')
# Top pages by hit count