diff --git a/scripts/init_vhost.sh b/scripts/init_vhost.sh index e6e5109fd..682e0f833 100755 --- a/scripts/init_vhost.sh +++ b/scripts/init_vhost.sh @@ -70,6 +70,10 @@ fi as_root() { if [[ "$(id -u)" -eq 0 ]]; then + # Allow callers to pass sudo-style flags without breaking root execution. + if [[ "${1:-}" == "-E" ]]; then + shift + fi "$@" else sudo "$@"