mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:14:44 +02:00
@ -69,9 +69,17 @@ impl WholeStreamCommand for WithEnv {
|
||||
}
|
||||
|
||||
async fn with_env(raw_args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
let redirection = raw_args.call_info.args.external_redirection;
|
||||
let context = EvaluationContext::from_args(&raw_args);
|
||||
let (WithEnvArgs { variable, block }, input) = raw_args.process().await?;
|
||||
let (
|
||||
WithEnvArgs {
|
||||
variable,
|
||||
mut block,
|
||||
},
|
||||
input,
|
||||
) = raw_args.process().await?;
|
||||
|
||||
block.block.set_redirect(redirection);
|
||||
let mut env = IndexMap::new();
|
||||
|
||||
match &variable.value {
|
||||
|
@ -186,7 +186,6 @@ pub async fn process_script(
|
||||
|
||||
ctx.scope.add_env(env);
|
||||
let result = run_block(&block, ctx, input_stream).await;
|
||||
|
||||
match result {
|
||||
Ok(input) => {
|
||||
// Running a pipeline gives us back a stream that we can then
|
||||
|
Reference in New Issue
Block a user