Skip to content

Commit 47491cd

Browse files
authored
fix: call tree-sitter via npm
And strip carriage return from grammar dir
1 parent 9a10bab commit 47491cd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/package-npm.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
run: |
5353
while read -r grammar_dir; do
5454
pushd "$grammar_dir"
55-
tree-sitter generate
55+
npm x -- tree-sitter generate
5656
popd > /dev/null
5757
done < <(jq -r '.grammars[].path // "."' tree-sitter.json)
5858
env:
@@ -96,8 +96,9 @@ jobs:
9696
shell: bash
9797
run: |
9898
while read -r grammar_dir; do
99+
grammar_dir="${grammar_dir%$'\r'}"
99100
pushd "$grammar_dir"
100-
tree-sitter generate
101+
npm x -- tree-sitter generate
101102
popd > /dev/null
102103
done < <(jq -r '.grammars[].path // "."' tree-sitter.json)
103104
- name: Build binary

.github/workflows/package-pypi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ jobs:
114114
shell: bash
115115
run: |
116116
while read -r grammar_dir; do
117+
grammar_dir="${grammar_dir%$'\r'}"
117118
pushd "$grammar_dir"
118119
tree-sitter generate
119120
popd > /dev/null

0 commit comments

Comments
 (0)