Skip to content

Commit 186348f

Browse files
authored
Fix out-of-bound access when command fails (#6)
Fix out-of-bound access when command fails
2 parents c43a66d + fedda83 commit 186348f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fn run_chroot(nixdir: &Path, rootdir: &Path, cmd: &str, args: &[String]) {
148148
.env("NIX_CONF_DIR", "/nix/etc/nix")
149149
.exec();
150150

151-
eprintln!("failed to execute {}: {}", &args[2], err);
151+
eprintln!("failed to execute {}: {}", &cmd, err);
152152
process::exit(1);
153153
}
154154

0 commit comments

Comments
 (0)