Skip to content

Commit 85a8c89

Browse files
committed
fix(entry-script): use correct php binary for proxy commands
These are the only instances, where the valet cli script is executed with the default php binary instead of the evaluated binary. We now use the `$PHP` executable to ensure that the valet cli is always called with the correct binary even when proxying composer / php.
1 parent ff4b767 commit 85a8c89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

valet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ elif [[ "$1" = "php" ]]
140140
then
141141
if [[ $2 == *"--site="* ]]; then
142142
SITE=${2#*=}
143-
$(php "$DIR/cli/valet.php" which-php $SITE) "${@:3}"
143+
$("$PHP" "$DIR/cli/valet.php" which-php $SITE) "${@:3}"
144144
else
145-
$(php "$DIR/cli/valet.php" which-php) "${@:2}"
145+
$("$PHP" "$DIR/cli/valet.php" which-php) "${@:2}"
146146
fi
147147

148148
exit
@@ -152,9 +152,9 @@ elif [[ "$1" = "composer" ]]
152152
then
153153
if [[ $2 == *"--site="* ]]; then
154154
SITE=${2#*=}
155-
$(php "$DIR/cli/valet.php" which-php $SITE) $(which composer) "${@:3}"
155+
$("$PHP" "$DIR/cli/valet.php" which-php $SITE) $(which composer) "${@:3}"
156156
else
157-
$(php "$DIR/cli/valet.php" which-php) $(which composer) "${@:2}"
157+
$("$PHP" "$DIR/cli/valet.php" which-php) $(which composer) "${@:2}"
158158
fi
159159

160160
exit

0 commit comments

Comments
 (0)