Make semicolon works better for internal commands (#6643)

* make semicolon works with some internal command like do

* refactor, make consume external result logic out of eval_external

* update comment
This commit is contained in:
WindSoilder
2022-09-30 20:13:46 +08:00
committed by GitHub
parent ca715bb929
commit 6f59167960
2 changed files with 71 additions and 56 deletions

View File

@ -11,3 +11,15 @@ fn capture_errors_works() {
assert_eq!(actual.out, "error");
}
#[test]
fn do_with_semicolon_break_on_failed_external() {
let actual = nu!(
cwd: ".", pipeline(
r#"
do { nu --not_exist_flag }; `text`
"#
));
assert_eq!(actual.out, "");
}