Skip to content

Commit

Permalink
stdbuf: fix get_preload_env doesn't need a mutable reference
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Aug 21, 2023
1 parent 808f9e2 commit ba8e936
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/stdbuf/src/stdbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let mut command = process::Command::new(command_values.next().unwrap());
let command_params: Vec<&str> = command_values.map(|s| s.as_ref()).collect();

let mut tmp_dir = tempdir().unwrap();
let (preload_env, libstdbuf) = get_preload_env(&mut tmp_dir).map_err_context(String::new)?;
let tmp_dir = tempdir().unwrap();
let (preload_env, libstdbuf) = get_preload_env(&tmp_dir).map_err_context(String::new)?;
command.env(preload_env, libstdbuf);
set_command_env(&mut command, "_STDBUF_I", &options.stdin);
set_command_env(&mut command, "_STDBUF_O", &options.stdout);
Expand Down

0 comments on commit ba8e936

Please sign in to comment.