mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
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:
parent
acd4cb83e8
commit
ccd0160c32
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user