mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
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:
@ -1,4 +1,3 @@
|
||||
use crate::util::get_guaranteed_cwd;
|
||||
use miette::Result;
|
||||
use nu_engine::{eval_block, eval_block_with_early_return};
|
||||
use nu_parser::parse;
|
||||
@ -284,8 +283,7 @@ pub fn eval_hook(
|
||||
}
|
||||
}
|
||||
|
||||
let cwd = get_guaranteed_cwd(engine_state, stack);
|
||||
engine_state.merge_env(stack, cwd)?;
|
||||
engine_state.merge_env(stack)?;
|
||||
|
||||
Ok(output)
|
||||
}
|
||||
|
Reference in New Issue
Block a user