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:
Douglas 2024-10-05 13:42:44 -04:00 committed by GitHub
parent 6964968f14
commit 27ebccce80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;