1
0
Fork 0

keep environment variables when using sudo

master
friendlyarm 2 years ago committed by GitHub
parent a6f43ff50a
commit 2d1149d6e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,7 @@
# Automatically re-run script under sudo if not root
if [ $(id -u) -ne 0 ]; then
echo "Re-running script under sudo..."
sudo "$0" "$@"
sudo --preserve-env "$0" "$@"
exit
fi

Loading…
Cancel
Save