Fix init_vhost root flag handling

This commit is contained in:
Haitao Pan 2026-01-28 11:07:37 +08:00
parent 9d700a412d
commit 1aa3d5db84

View File

@ -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 "$@"