mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
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.
This commit is contained in:
8
valet
8
valet
@@ -140,9 +140,9 @@ elif [[ "$1" = "php" ]]
|
||||
then
|
||||
if [[ $2 == *"--site="* ]]; then
|
||||
SITE=${2#*=}
|
||||
$(php "$DIR/cli/valet.php" which-php $SITE) "${@:3}"
|
||||
$("$PHP" "$DIR/cli/valet.php" which-php $SITE) "${@:3}"
|
||||
else
|
||||
$(php "$DIR/cli/valet.php" which-php) "${@:2}"
|
||||
$("$PHP" "$DIR/cli/valet.php" which-php) "${@:2}"
|
||||
fi
|
||||
|
||||
exit
|
||||
@@ -152,9 +152,9 @@ elif [[ "$1" = "composer" ]]
|
||||
then
|
||||
if [[ $2 == *"--site="* ]]; then
|
||||
SITE=${2#*=}
|
||||
$(php "$DIR/cli/valet.php" which-php $SITE) $(which composer) "${@:3}"
|
||||
$("$PHP" "$DIR/cli/valet.php" which-php $SITE) $(which composer) "${@:3}"
|
||||
else
|
||||
$(php "$DIR/cli/valet.php" which-php) $(which composer) "${@:2}"
|
||||
$("$PHP" "$DIR/cli/valet.php" which-php) $(which composer) "${@:2}"
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user