Execute-elevated (#892)

* Introduce the execute elevated method (fix #885)

* fmt

* Fix nix with doas

* Bad import
This commit is contained in:
Roey Darwish Dror
2022-04-09 16:29:55 +03:00
committed by GitHub
parent 5de33a91d1
commit 5ecf8300ef
3 changed files with 23 additions and 16 deletions

View File

@@ -547,11 +547,7 @@ pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {
}
print_separator("Configuration update");
ctx.run_type()
.execute(sudo)
.arg("--preserve-env=DIFFPROG")
.arg(pacdiff)
.check_run()?;
ctx.execute_elevated(&pacdiff, false)?.check_run()?;
}
Ok(())