Process: Preserve environment when "runAsRoot" is enabled

Change-Id: I2078925b48d8fc3053e2be9632248e3fff9ea608
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-03-12 12:54:31 +01:00
parent 16decfec67
commit 41f1bc141d

View File

@@ -226,6 +226,7 @@ void DefaultImpl::start()
if (m_setup.m_runAsRoot && !HostOsInfo::isWindowsHost()) { if (m_setup.m_runAsRoot && !HostOsInfo::isWindowsHost()) {
arguments.prepend(program); arguments.prepend(program);
arguments.prepend("-E");
arguments.prepend("-A"); arguments.prepend("-A");
program = "sudo"; program = "sudo";
} }