Keep the environment properly set. (#3072)

* Revert "fix prompts on startup (#3056)"

This reverts commit b202951c1d.

* Ensure environment variables synced with global internal Nu Scope.
This commit is contained in:
Andrés N. Robalino
2021-02-17 21:56:14 -05:00
committed by GitHub
parent 892aae267d
commit 08e7d0dfb6
6 changed files with 233 additions and 53 deletions

View File

@ -80,6 +80,7 @@ async fn with_env(raw_args: CommandArgs) -> Result<OutputStream, ShellError> {
) = raw_args.process().await?;
block.block.set_redirect(redirection);
let mut env = IndexMap::new();
match &variable.value {

View File

@ -186,6 +186,7 @@ pub async fn process_script(
ctx.scope.add_env_to_base(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