mirror of
https://github.com/nushell/nushell.git
synced 2025-04-16 09:18:21 +02:00
Fix wrong stdout with e>|
(#12227)
# Description Fixes a bug where stdout would not be the terminal if a `e>|` pipe was used.
This commit is contained in:
parent
992359a191
commit
127c4a9e63
@ -497,14 +497,14 @@ pub fn eval_block<D: DebugContext>(
|
|||||||
|
|
||||||
for (i, element) in elements.iter().enumerate() {
|
for (i, element) in elements.iter().enumerate() {
|
||||||
let next = elements.get(i + 1).unwrap_or(last);
|
let next = elements.get(i + 1).unwrap_or(last);
|
||||||
|
let (next_out, next_err) = next.stdio_redirect(engine_state);
|
||||||
let (stdout, stderr) = eval_element_redirection::<D>(
|
let (stdout, stderr) = eval_element_redirection::<D>(
|
||||||
engine_state,
|
engine_state,
|
||||||
stack,
|
stack,
|
||||||
element.redirection.as_ref(),
|
element.redirection.as_ref(),
|
||||||
next.stdio_redirect(engine_state),
|
(next_out.or(Some(IoStream::Pipe)), next_err),
|
||||||
)?;
|
)?;
|
||||||
let stack = &mut stack
|
let stack = &mut stack.push_redirection(stdout, stderr);
|
||||||
.push_redirection(stdout.or(Some(Redirection::Pipe(IoStream::Pipe))), stderr);
|
|
||||||
let (output, failed) =
|
let (output, failed) =
|
||||||
eval_element_with_input::<D>(engine_state, stack, element, input)?;
|
eval_element_with_input::<D>(engine_state, stack, element, input)?;
|
||||||
if failed {
|
if failed {
|
||||||
|
Loading…
Reference in New Issue
Block a user