Skip to content

Commit abc682e

Browse files
edmundmillerclaude
andcommitted
fix(ci): install tree-sitter CLI globally instead of npm ci
`npm ci --ignore-scripts` also skipped tree-sitter-cli's postinstall, so the tree-sitter binary was missing (ENOENT on generate). Install the CLI globally — building the parser library needs only the CLI, not the project's node bindings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ab03357 commit abc682e

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/ast-grep-distribution.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,19 @@ jobs:
5050
- uses: actions/setup-node@v4
5151
with:
5252
node-version: 20
53-
cache: npm
5453

55-
# Skip the package `install` script (node-gyp-build); we only need the
56-
# tree-sitter CLI to generate and build the parser library.
54+
# Install the CLI globally rather than via `npm ci`: building the parser
55+
# library only needs the tree-sitter CLI, not the project's node bindings
56+
# (whose install runs node-gyp). The global install's postinstall fetches
57+
# the platform tree-sitter binary.
5758
- name: Install tree-sitter CLI
58-
run: npm ci --ignore-scripts
59+
run: npm install -g tree-sitter-cli@^0.24.5
5960

6061
- name: Generate parser
61-
run: npx tree-sitter generate
62+
run: tree-sitter generate
6263

6364
- name: Build parser library
64-
run: npx tree-sitter build --output "${{ matrix.libname }}"
65+
run: tree-sitter build --output "${{ matrix.libname }}"
6566

6667
- name: Verify parser symbol
6768
run: |

0 commit comments

Comments
 (0)