From 1aa3d5db849a6aa9695e23e8e7c36b64d8ace996 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Wed, 28 Jan 2026 11:07:37 +0800 Subject: [PATCH] Fix init_vhost root flag handling --- scripts/init_vhost.sh | 4 ++++ 1 file changed, 4 insertions(+) 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 "$@"