mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
Set proc/env cwd to engine_state value (#14005)
# Description Fixes #14000 by once again calling `set_current_dir()`, but doing so with the `cwd` from the current state, rather than the (previously removed) argument to `merge_env()`. # User-Facing Changes Bug fix # Tests + Formatting If this looks good, I'll look at adding a test case for it. - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A
This commit is contained in:
parent
6964968f14
commit
27ebccce80
1 changed files with 4 additions and 0 deletions
|
@ -320,6 +320,10 @@ impl EngineState {
|
|||
}
|
||||
}
|
||||
|
||||
let cwd = self.cwd(Some(stack))?;
|
||||
// TODO: better error
|
||||
std::env::set_current_dir(cwd)?;
|
||||
|
||||
if let Some(config) = stack.config.take() {
|
||||
// If config was updated in the stack, replace it.
|
||||
self.config = config;
|
||||
|
|
Loading…
Reference in a new issue