diff --git a/src/exec.rs b/src/exec.rs index 0d8362498..0b9e9b7ba 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -1106,7 +1106,6 @@ fn get_performer_for_builtin(p: &Process, j: &Job, io_chain: &IoChain) -> Box Box, errput_stream: Option<&mut OutputStream>| { let output_stream = output_stream.unwrap(); @@ -1151,8 +1150,11 @@ fn get_performer_for_builtin(p: &Process, j: &Job, io_chain: &IoChain) -> Box = - argv.iter().map(|s| truncate_at_nul(s.as_ref())).collect(); + let mut shim_argv: Vec<&wstr> = p + .argv() + .iter() + .map(|s| truncate_at_nul(s.as_ref())) + .collect(); builtin_run(parser, &mut shim_argv, &mut streams) }, )