Fix nixos-rebuild sudo path mismatch
Use explicit /run/current-system/sw/bin/nixos-rebuild path instead of 'nixos-rebuild' command to match sudo rules exactly. This resolves 'command not allowed' errors when the command resolves to nix store paths.
This commit is contained in:
parent
114ad52ae8
commit
7b7e323fd8
@ -302,7 +302,7 @@ impl Agent {
|
|||||||
tokio::process::Command::new("sudo")
|
tokio::process::Command::new("sudo")
|
||||||
.arg("-u")
|
.arg("-u")
|
||||||
.arg("cm")
|
.arg("cm")
|
||||||
.arg("nixos-rebuild")
|
.arg("/run/current-system/sw/bin/nixos-rebuild")
|
||||||
.arg("switch")
|
.arg("switch")
|
||||||
.current_dir(working_dir)
|
.current_dir(working_dir)
|
||||||
.output()
|
.output()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user