mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
stdbuf: fix get_preload_env doesn't need a mutable reference
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user