Make the store-env IR instruction also update config (#13351)

# Description

Follow up fix to #13332, so that changes to config when running under IR
actually happen as well. Since I merged them around the same time, I
forgot about this.
This commit is contained in:
Devyn Cairns 2024-07-11 10:49:46 -07:00 committed by GitHub
parent acd4cb83e8
commit ccd0160c32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -367,7 +367,11 @@ fn eval_instruction<D: DebugContext>(
let key = get_env_var_name_case_insensitive(ctx, key); let key = get_env_var_name_case_insensitive(ctx, key);
if !is_automatic_env_var(&key) { if !is_automatic_env_var(&key) {
let is_config = key == "config";
ctx.stack.add_env_var(key.into_owned(), value); ctx.stack.add_env_var(key.into_owned(), value);
if is_config {
ctx.stack.update_config(ctx.engine_state)?;
}
Ok(Continue) Ok(Continue)
} else { } else {
Err(ShellError::AutomaticEnvVarSetManually { Err(ShellError::AutomaticEnvVarSetManually {