Skip to content

Commit e459ffb

Browse files
committed
Fix bug with php & node overrides with spaces in paths
1 parent 968353e commit e459ffb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

overrides/path/node

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
set -e
33

44
# Exclude ourselves from PATH, find the real node, then reset PATH
5-
PATH="${PATH//`dirname $0`:/}"
5+
PATH="${PATH//`dirname "$0"`:/}"
66
real_node=`command -v node`
7-
PATH="`dirname $0`:$PATH"
7+
PATH="`dirname "$0"`:$PATH"
88

9-
PREPEND_PATH=`dirname $0`/prepend.js
9+
PREPEND_PATH=`dirname "$0"`/prepend.js
1010

1111
# Call node with the given arguments, prefixed with our extra logic
1212
if command -v winpty >/dev/null 2>&1; then

overrides/path/php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
set -e
33

44
# Exclude ourselves from PATH, find the real php, then reset PATH
5-
PATH="${PATH//`dirname $0`:/}"
5+
PATH="${PATH//`dirname "$0"`:/}"
66
real_php=`command -v php`
7-
PATH="`dirname $0`:$PATH"
7+
PATH="`dirname "$0"`:$PATH"
88

99
# Call PHP with the given arguments, and a few extra
1010
PHP_ARGS=(
@@ -13,13 +13,13 @@ PHP_ARGS=(
1313
# Make cURL trust us
1414
-d "curl.cainfo=$SSL_CERT_FILE" \
1515
# Prepend a script that enables the proxy
16-
-d "auto_prepend_file=`dirname $0`/prepend.php" \
16+
-d "auto_prepend_file=`dirname "$0"`/prepend.php" \
1717
# Pass through all other provided arguments
1818
"$@"
1919
)
2020

2121
if command -v winpty >/dev/null 2>&1; then
22-
winpty "$real_php" ${PHP_ARGS[@]}
22+
winpty "$real_php" "${PHP_ARGS[@]}"
2323
else
24-
"$real_php" ${PHP_ARGS[@]}
24+
"$real_php" "${PHP_ARGS[@]}"
2525
fi

0 commit comments

Comments
 (0)