File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- DIR=" $( dirname " $( realpath " $0 " ) " ) "
3+ DIR=$( cd " $( dirname " $0 " ) " && pwd )
44PARENT_DIR=" $( dirname " $DIR " ) "
55
66node --enable-source-maps " ${PARENT_DIR} " /libnest.js " $@ "
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- DIR=" $( dirname " $( realpath " $0 " ) " ) "
3+ DIR=$( cd " $( dirname " $0 " ) " && pwd )
44PARENT_DIR=" $( dirname " $DIR " ) "
55
66RUNTIME_ARGS=" "
@@ -14,10 +14,14 @@ case "$LIBNEST_JAVASCRIPT_RUNTIME" in
1414 RUNTIME_ARGS=" -A --unstable-sloppy-imports"
1515 ;;
1616 * )
17- echo " Error: Invalid runtime '$LIBNEST_JAVASCRIPT_RUNTIME ': must be 'node' or 'deno'" >&2
17+ echo " Error: Invalid runtime '$LIBNEST_JAVASCRIPT_RUNTIME ': must be 'node', 'bun', or 'deno'" >&2
1818 exit 1
1919 ;;
2020esac
2121
22- eval $LIBNEST_JAVASCRIPT_RUNTIME $RUNTIME_ARGS " ${PARENT_DIR} " /libnest-build.js " $@ "
22+ if ! command -v " $LIBNEST_JAVASCRIPT_RUNTIME " > /dev/null 2>&1 ; then
23+ echo " Error: Runtime '$LIBNEST_JAVASCRIPT_RUNTIME ' not found in PATH" >&2
24+ exit 1
25+ fi
2326
27+ exec " $LIBNEST_JAVASCRIPT_RUNTIME " $RUNTIME_ARGS " ${PARENT_DIR} /libnest-build.js" " $@ "
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- DIR=" $( dirname " $( realpath " $0 " ) " ) "
3+ DIR=$( cd " $( dirname " $0 " ) " && pwd )
44PARENT_DIR=" $( dirname " $DIR " ) "
55
66NO_WATCH=false
@@ -26,9 +26,14 @@ case "$LIBNEST_JAVASCRIPT_RUNTIME" in
2626 RUNTIME_ARGS=" -A --unstable-sloppy-imports"
2727 ;;
2828 * )
29- echo " Error: Invalid runtime '$LIBNEST_JAVASCRIPT_RUNTIME ': must be 'node' or 'deno'" >&2
29+ echo " Error: Invalid runtime '$LIBNEST_JAVASCRIPT_RUNTIME ': must be 'node', 'bun', or 'deno'" >&2
3030 exit 1
3131 ;;
3232esac
3333
34- eval $LIBNEST_JAVASCRIPT_RUNTIME $RUNTIME_ARGS " ${PARENT_DIR} /libnest-dev.js" " $@ "
34+ if ! command -v " $LIBNEST_JAVASCRIPT_RUNTIME " > /dev/null 2>&1 ; then
35+ echo " Error: Runtime '$LIBNEST_JAVASCRIPT_RUNTIME ' not found in PATH" >&2
36+ exit 1
37+ fi
38+
39+ exec $LIBNEST_JAVASCRIPT_RUNTIME $RUNTIME_ARGS " ${PARENT_DIR} /libnest-dev.js" " $@ "
You can’t perform that action at this time.
0 commit comments