fix(host): preserve shell variables in privileged fixups

This commit is contained in:
archipelago
2026-08-31 10:24:06 -04:00
parent 699669a5f7
commit 5b6d278c46
+6
View File
@@ -1487,6 +1487,11 @@ pub(crate) async fn host_sudo(args: &[&str]) -> Result<std::process::ExitStatus>
"--quiet", "--quiet",
"--collect", "--collect",
"--pipe", "--pipe",
// Shell snippets passed as one argument must reach the child intact.
// systemd-run otherwise expands $VAR/${VAR} against the manager's
// environment before `sh -lc` can see them (and usually replaces them
// with empty strings).
"--expand-environment=no",
"--", "--",
]; ];
full.extend_from_slice(args); full.extend_from_slice(args);
@@ -1506,6 +1511,7 @@ pub(crate) async fn host_sudo_output(args: &[&str]) -> Result<std::process::Outp
"--quiet", "--quiet",
"--collect", "--collect",
"--pipe", "--pipe",
"--expand-environment=no",
"--", "--",
]; ];
full.extend_from_slice(args); full.extend_from_slice(args);