Remove std::env::set_current_dir() call from EngineState::merge_env() (#12922)

As discussed in https://github.com/nushell/nushell/pull/12749, we no
longer need to call `std::env::set_current_dir()` to sync `$env.PWD`
with the actual working directory. This PR removes the call from
`EngineState::merge_env()`.
This commit is contained in:
YizhePKU
2024-05-23 00:58:27 +08:00
committed by GitHub
parent 75689ec98a
commit 7ede90cba5
10 changed files with 41 additions and 83 deletions

View File

@ -138,7 +138,7 @@ pub fn check_example_evaluates_to_expected_output(
stack.add_env_var("PWD".to_string(), Value::test_string(cwd.to_string_lossy()));
engine_state
.merge_env(&mut stack, cwd)
.merge_env(&mut stack)
.expect("Error merging environment");
let empty_input = PipelineData::empty();