mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
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:
@ -187,3 +187,19 @@ fn test_lexical_binding() -> TestResult {
|
||||
"3",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn propagate_errors_in_export_env_on_use() -> TestResult {
|
||||
fail_test(
|
||||
r#"module foo { export-env { error make -u { msg: "error in export-env"} } }; use foo"#,
|
||||
"error in export-env",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn propagate_errors_in_export_env_when_run() -> TestResult {
|
||||
fail_test(
|
||||
r#"export-env { error make -u { msg: "error in export-env" } }"#,
|
||||
"error in export-env",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user