mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Fix do -p
not waiting for external commands (#13881)
# Description Similar to #13870 (thanks @WindSoilder), this PR adds a boolean which determines whether to ignore any errors from an external command. This is in order to fix #13876. I.e., `do -p` does not wait for externals to complete before continuing. # User-Facing Changes Bug fix. # Tests + Formatting Added a test.
This commit is contained in:
@ -73,3 +73,10 @@ fn run_closure_with_it_using() {
|
||||
assert!(actual.err.is_empty());
|
||||
assert_eq!(actual.out, "3");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn waits_for_external() {
|
||||
let actual = nu!(r#"do -p { nu -c 'sleep 1sec; print before; exit 1'}; print after"#);
|
||||
assert!(actual.err.is_empty());
|
||||
assert_eq!(actual.out, "beforeafter");
|
||||
}
|
||||
|
Reference in New Issue
Block a user