Skip to content

Commit 5800b30

Browse files
authored
Add node20 fallback to ./sd (#506)
1 parent 41565eb commit 5800b30

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
#!/usr/bin/env sh
22

3-
node --experimental-strip-types --no-warnings src/cli.mts "$@"
3+
# node 20 does not support strip types (yet) so we have go the slow path
4+
# Note that we don't rebuild here... this will be annoying later but I
5+
# think this is only for dev where we don't need to run node 20.
6+
# Should we emit a warning anyways? Maybe.
7+
if [ "$(node -v | cut -d'v' -f2 | cut -d'.' -f1)" -lt 22 ]; then
8+
npm run s -- "$@"
9+
else
10+
node --experimental-strip-types --no-warnings src/cli.mts "$@"
11+
fi

0 commit comments

Comments
 (0)