mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 15:16:17 +02:00
Fix hooks on 0.92.0 (#12383)
# Description Fixes #12382, where overlay changes from hooks were not preserved into the global state. This was due to creating child stacks for hooks, when the global stack should have been used instead.
This commit is contained in:
@ -125,9 +125,9 @@ impl Stack {
|
||||
unique_stack.env_vars = child.env_vars;
|
||||
unique_stack.env_hidden = child.env_hidden;
|
||||
unique_stack.active_overlays = child.active_overlays;
|
||||
for item in child.parent_deletions.into_iter() {
|
||||
unique_stack.vars.remove(item);
|
||||
}
|
||||
unique_stack
|
||||
.vars
|
||||
.retain(|(var, _)| !child.parent_deletions.contains(var));
|
||||
unique_stack
|
||||
}
|
||||
pub fn with_env(
|
||||
|
Reference in New Issue
Block a user