mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:25:38 +02:00
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:
committed by
GitHub
parent
892aae267d
commit
08e7d0dfb6
@ -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 {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user