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:
parent
808f9e2fd6
commit
ba8e9366f6
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue