Skip to content

Commit e144bc6

Browse files
Enalmadaclaude
andcommitted
ci(check-tss-2): apt-get install ripgrep (not preinstalled on ubuntu-latest)
I assumed wrong: ubuntu-latest does NOT ship with ripgrep. CI failed at the script's `command -v rg` guard. Install it explicitly in the workflow + update the SKILL.md note. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 07d48a2 commit e144bc6

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.claude/skills/tanstack-start/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ See [scripts/check-tss-2.sh](scripts/check-tss-2.sh). Run via `bun run check-tss
184184

185185
Implementation notes worth banking:
186186

187-
- The script requires **ripgrep (`rg`)** for `--multiline --multiline-dotall -nP` (POSIX `grep -P` is GNU-only and can't match across lines). The guard at the top of the script gives an install hint when missing. CI's `ubuntu-latest` ships with rg preinstalled.
187+
- The script requires **ripgrep (`rg`)** for `--multiline --multiline-dotall -nP` (POSIX `grep -P` is GNU-only and can't match across lines). The guard at the top of the script gives an install hint when missing. CI installs it via `apt-get install ripgrep` in the workflow — ubuntu-latest does not ship with it.
188188
- The two carve-outs (`import type { … }` and `~/server/db/schema/*-schemas.ts`) live in **PCRE negative lookaheads inside the main regex**, not in post-filter `grep -v` pipes. Earlier versions used pipes and silently missed multi-line imports — `rg --multiline` matches the whole block as one logical hit but emits each line separately, so a `type` keyword on line 1 was stripped before the path-matched line was emitted. The lookahead approach fires BEFORE any path matching and correctly skips the whole match regardless of line layout.
189189
- All character classes use **POSIX `[[:space:]]` etc., NOT `\s` / `\d` / `\w`**. BSD grep (macOS default `/usr/bin/grep`) treats `\s` as the literal `s`.
190190
- When ripping out a Vite alias (e.g. removing `src/polyfills/use-sync-external-store-shim.ts`), grep `.storybook/`, `vitest.config*`, and any per-tool config for the same find-key. A single `vite.config.ts` edit is not sufficient when the project has parallel toolchains — Storybook's `viteFinal` and Vitest configs maintain their own alias blocks.

.github/workflows/check-tss-2.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ jobs:
1515
with:
1616
bun-version: latest
1717

18-
# No need to `bun install` — the script only uses grep + ripgrep + bash.
19-
# ubuntu-latest ships with ripgrep preinstalled (verified via runner-images).
18+
# The script uses grep + ripgrep + bash. ubuntu-latest does NOT ship
19+
# with ripgrep — install it explicitly.
20+
- name: Install ripgrep
21+
run: sudo apt-get update && sudo apt-get install -y ripgrep
22+
2023
- name: TSS-2 bundle-leak check
2124
run: bun run check-tss-2

0 commit comments

Comments
 (0)