Skip to content

Commit

Permalink
Fix out-of-bound access when command fails (#6)
Browse files Browse the repository at this point in the history
Fix out-of-bound access when command fails
  • Loading branch information
Mic92 authored Apr 25, 2019
2 parents c43a66d + fedda83 commit 186348f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fn run_chroot(nixdir: &Path, rootdir: &Path, cmd: &str, args: &[String]) {
.env("NIX_CONF_DIR", "/nix/etc/nix")
.exec();

eprintln!("failed to execute {}: {}", &args[2], err);
eprintln!("failed to execute {}: {}", &cmd, err);
process::exit(1);
}

Expand Down

0 comments on commit 186348f

Please # to comment.