1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Preserve User (and env) when calling sudo commands

Fixes #321
Creds to @Patistar
This commit is contained in:
Chris Brown
2019-04-17 20:40:45 -04:00
parent a6971e0788
commit df7e46ebea

2
valet
View File

@@ -22,7 +22,7 @@ fi
if [[ "$EUID" -ne 0 ]]
then
sudo "$SOURCE" "$@"
sudo --preserve-env "$SOURCE" "$@"
exit
fi