Skip to content

Commit f26a892

Browse files
Patel230claude
andcommitted
fix(boundary): fall back to grep when rg is unavailable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 735e3f4 commit f26a892

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/check-ecosystem-boundaries.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ set -euo pipefail
44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55
cd "$ROOT_DIR"
66

7-
violations="$(
8-
rg -n 'github\.com/GrayCodeAI/hawk/(internal/|shared/types)' \
9-
--glob '*.go' \
10-
. || true
11-
)"
7+
if command -v rg >/dev/null 2>&1; then
8+
violations="$(rg -n 'github\.com/GrayCodeAI/hawk/(internal/|shared/types)' --glob '*.go' . || true)"
9+
else
10+
violations="$(grep -rn --include='*.go' -E 'github\.com/GrayCodeAI/hawk/(internal/|shared/types)' . || true)"
11+
fi
1212

1313
if [[ -n "${violations}" ]]; then
1414
echo "forbidden Hawk imports found:"

0 commit comments

Comments
 (0)