mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
dont double sudo if already sudo
This commit is contained in:
7
valet
7
valet
@@ -22,7 +22,12 @@ fi
|
||||
|
||||
if [[ "$1" = "install" ]] || [[ "$1" = "domain" ]] || [[ "$1" = "start" ]] || [[ "$1" = "restart" ]] || [[ "$1" = "stop" ]] || [[ "$1" = "uninstall" ]]
|
||||
then
|
||||
sudo php "$DIR/cli/valet.php" "$@"
|
||||
if [[ "$EUID" -ne 0 ]]
|
||||
then
|
||||
sudo php "$DIR/cli/valet.php" "$@"
|
||||
else
|
||||
php "$DIR/cli/valet.php" "$@"
|
||||
fi
|
||||
elif [[ "$1" = "update" ]]
|
||||
then
|
||||
bash <(curl -s https://raw.githubusercontent.com/laravel/valet/master/update.sh)
|
||||
|
||||
Reference in New Issue
Block a user