1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00
This commit is contained in:
Matt Stauffer
2023-02-18 21:49:11 -05:00
parent 3790e512af
commit 1d0483a0c8
2 changed files with 16 additions and 4 deletions

14
valet
View File

@@ -143,14 +143,24 @@ then
# Proxy PHP commands to the "php" executable on the isolated site
elif [[ "$1" = "php" ]]
then
$($PHP "$DIR/cli/valet.php" which-php) "${@:2}"
if [[ $2 == *"--site="* ]]; then
SITE=${2#*=}
$(php "$DIR/cli/valet.php" which-php $SITE) "${@:3}"
else
$(php "$DIR/cli/valet.php" which-php) "${@:2}"
fi
exit
# Proxy Composer commands with the "php" executable on the isolated site
elif [[ "$1" = "composer" ]]
then
$($PHP "$DIR/cli/valet.php" which-php) $(which composer) "${@:2}"
if [[ $2 == *"--site="* ]]; then
SITE=${2#*=}
$(php "$DIR/cli/valet.php" which-php $SITE) $(which composer) "${@:3}"
else
$(php "$DIR/cli/valet.php" which-php) $(which composer) "${@:2}"
fi
exit