forked from extern/nushell
fix error propagation in export-env
(#14847)
- fixes #14801 # Description - Fixed the issue - Added some comments mirroring the ones used in `export-env` handling in `use` - Added two tests to prevent regressions # User-Facing Changes # Tests + Formatting - 🟢 toolkit fmt - 🟢 toolkit clippy - 🟢 toolkit test - 🟢 toolkit test stdlib # After Submitting
This commit is contained in:
4
crates/nu-command/src/env/export_env.rs
vendored
4
crates/nu-command/src/env/export_env.rs
vendored
@ -57,8 +57,10 @@ impl Command for ExportEnv {
|
||||
|
||||
let eval_block = get_eval_block(engine_state);
|
||||
|
||||
let _ = eval_block(engine_state, &mut callee_stack, block, input);
|
||||
// Run the block (discard the result)
|
||||
let _ = eval_block(engine_state, &mut callee_stack, block, input)?;
|
||||
|
||||
// Merge the block's environment to the current stack
|
||||
redirect_env(engine_state, caller_stack, &callee_stack);
|
||||
|
||||
Ok(PipelineData::empty())
|
||||
|
Reference in New Issue
Block a user