1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

stdbuf: fix get_preload_env doesn't need a mutable reference

This commit is contained in:
Daniel Hofstetter 2023-08-21 10:36:40 +02:00
parent 808f9e2fd6
commit ba8e9366f6

View file

@ -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);