File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -e
33
4- # Exclude ourselves from PATH within this script, to avoid recursing
5- PATH=" ${PATH/ `dirname $0 `:/ } "
4+ # Exclude ourselves from PATH, find the real node, then reset PATH
5+ PATH=" ${PATH// `dirname $0 `:/ } "
6+ real_node=` command -v node`
7+ PATH=" ` dirname $0 ` :$PATH "
68
7- GLOBAL_AGENT_PATH =` dirname $0 ` /prepend.js
9+ PREPEND_PATH =` dirname $0 ` /prepend.js
810
911# Call node with the given arguments, prefixed with our extra logic
1012if command -v winpty > /dev/null 2>&1 ; then
11- winpty node -r " $GLOBAL_AGENT_PATH " " $@ "
13+ winpty $real_node -r " $PREPEND_PATH " " $@ "
1214else
13- node -r " $GLOBAL_AGENT_PATH " " $@ "
15+ $real_node -r " $PREPEND_PATH " " $@ "
1416fi
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -e
33
4- # Exclude ourselves from PATH within this script, to avoid recursing
5- PATH=" ${PATH/ `dirname $0 `:/ } "
4+ # Exclude ourselves from PATH, find the real php, then reset PATH
5+ PATH=" ${PATH// `dirname $0 `:/ } "
6+ real_php=` command -v php`
7+ PATH=" ` dirname $0 ` :$PATH "
68
79# Call PHP with the given arguments, and a few extra
810PHP_ARGS=(
@@ -17,7 +19,7 @@ PHP_ARGS=(
1719)
1820
1921if command -v winpty > /dev/null 2>&1 ; then
20- winpty php ${PHP_ARGS[@]}
22+ winpty $real_php ${PHP_ARGS[@]}
2123else
22- php ${PHP_ARGS[@]}
24+ $real_php ${PHP_ARGS[@]}
2325fi
You can’t perform that action at this time.
0 commit comments