Throw out error if external command in subexpression is failed to run (#8204)

This commit is contained in:
WindSoilder
2023-03-01 19:50:38 +08:00
committed by GitHub
parent 324d625324
commit dec0a2517f
3 changed files with 128 additions and 19 deletions

View File

@ -139,6 +139,17 @@ fn failed_command_with_semicolon_will_not_execute_following_cmds() {
})
}
#[test]
fn semicolon_works_within_subcommand() {
Playground::setup("external failed command with semicolon", |dirs, _| {
let actual = nu!(
cwd: dirs.test(), pipeline(r#"(nu --testbin outcome_err "aa"; echo done)"#
));
assert!(!actual.out.contains("done"));
})
}
#[cfg(not(windows))]
#[test]
fn external_args_with_quoted() {