mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:05:54 +02:00
fix(overlay use): report errors in export-env (#16184)
- fixes #10242 # Tests + Formatting Added 2 tests to confirm `use` and `overlay use` report errors in `export-env` blocks. --------- Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
This commit is contained in:
@ -354,3 +354,15 @@ fn test_use_with_printing_current_file() {
|
||||
assert_eq!(actual.out, dirs.test().join("mod.nu").to_string_lossy());
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn report_errors_in_export_env() {
|
||||
let actual = nu!(r#"
|
||||
module spam {
|
||||
export-env { error make -u {msg: "reported"} }
|
||||
}
|
||||
use spam
|
||||
"#);
|
||||
|
||||
assert!(actual.err.contains("reported"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user