Each much clone its env (#675)

This commit is contained in:
JT 2022-01-05 23:08:03 +11:00 committed by GitHub
parent f71e16685c
commit 3c2a336ef9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,8 @@ impl Command for Each {
.into_iter()
.enumerate()
.map(move |(idx, x)| {
stack.with_env(&orig_env_vars, &orig_env_hidden);
stack.env_vars = orig_env_vars.clone();
stack.env_hidden = orig_env_hidden.clone();
if let Some(var) = block.signature.get_positional(0) {
if let Some(var_id) = &var.var_id {