Skip to content

Commit 57611a7

Browse files
committed
MSYS2 compatibility
1 parent 26c81b5 commit 57611a7

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ GRAMMAR_DIR="src/cedarscript_grammar"
66

77
ts() (
88
cd "$TARGET_DIR" || exit
9-
if [ -n "$GITHUB_ACTIONS" ] || [ "$(uname)" = "Linux" ]; then
9+
command -v tree-sitter &> /dev/null && {
10+
set -x
11+
tree-sitter "$@"
12+
return
13+
}
14+
if test "$GITHUB_ACTIONS" || uname | grep -Eq '^(MSYS|Linux)'; then
1015
# On GitHub Actions or Linux, install and use tree-sitter from npm
11-
if ! command -v tree-sitter &> /dev/null; then
12-
npm install --global tree-sitter-cli
13-
fi
14-
tree-sitter "$@"
15-
return
16+
npm install --global tree-sitter-cli
1617
fi
17-
# Local development on macOS ARM64
18-
tree-sitter-macos-arm64 "$@"
18+
tree-sitter "$@"
1919
)
2020

2121
playground() {

0 commit comments

Comments
 (0)