Make Semicolon stop on error (#6079)

* introduce external command runs to failed error, and implement semicolon relative logic

* ignore test due to semicolon works

* not raise ShellError for external commands

* update comment

* add relative test in for windows

* fix type-o

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
WindSoilder
2022-07-20 20:44:42 +08:00
committed by GitHub
parent 558cd58d09
commit a35a71fd82
6 changed files with 111 additions and 11 deletions

View File

@ -92,6 +92,7 @@ impl Command for If {
call.redirect_stdout,
call.redirect_stderr,
)
.map(|res| res.0)
}
} else {
eval_expression_with_input(
@ -102,6 +103,7 @@ impl Command for If {
call.redirect_stdout,
call.redirect_stderr,
)
.map(|res| res.0)
}
} else {
Ok(PipelineData::new(call.head))

View File

@ -61,7 +61,8 @@ impl Command for Let {
input,
call.redirect_stdout,
call.redirect_stderr,
)?;
)?
.0;
//println!("Adding: {:?} to {}", rhs, var_id);