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:
Ian Manske
2024-04-04 07:25:54 +00:00
committed by GitHub
parent cbf7feef22
commit cd00a489af
3 changed files with 60 additions and 61 deletions

View File

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