fix prompts on startup (#3056)

* fix prompts on startup

* Try again
This commit is contained in:
Jonathan Turner
2021-02-15 20:14:16 +13:00
committed by GitHub
parent c3d2c61729
commit b202951c1d
6 changed files with 109 additions and 214 deletions

View File

@ -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 {

View File

@ -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