From 358fbd8c0265b899a8914a2d5f1fe1092c4afc9c Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Sun, 21 Feb 2021 12:06:37 +0200 Subject: [PATCH] Fix nix on multi-user setup (fix #646) (#650) --- src/steps/os/unix.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/steps/os/unix.rs b/src/steps/os/unix.rs index 013988c4..3389f063 100644 --- a/src/steps/os/unix.rs +++ b/src/steps/os/unix.rs @@ -175,7 +175,10 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> { if multi_user { if let Some(sudo) = ctx.sudo() { - run_type.execute(&sudo).arg("nix").arg("upgrade-nix").check_run()?; + run_type + .execute(&sudo) + .args(&["-i", "nix", "upgrade-nix"]) + .check_run()?; } else { print_warning("Need sudo to upgrade Nix"); }