Add pipeline redirection support (#4594)

* redirection

* Remove commented-out

* fix tests

* more fixes
This commit is contained in:
JT
2022-02-21 17:22:21 -05:00
committed by GitHub
parent 739e403cd5
commit 9888f8f298
46 changed files with 463 additions and 288 deletions

View File

@ -39,8 +39,9 @@ impl Command for LetEnv {
.as_keyword()
.expect("internal error: missing keyword");
let rhs = eval_expression_with_input(engine_state, stack, keyword_expr, input, false)?
.into_value(call.head);
let rhs =
eval_expression_with_input(engine_state, stack, keyword_expr, input, false, true)?
.into_value(call.head);
if env_var == "PWD" {
let cwd = current_dir(engine_state, stack)?;

View File

@ -132,7 +132,14 @@ fn with_env(
stack.add_env_var(k, v);
}
eval_block(engine_state, &mut stack, block, input)
eval_block(
engine_state,
&mut stack,
block,
input,
call.redirect_stdout,
call.redirect_stderr,
)
}
#[cfg(test)]