forked from extern/nushell
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:
@ -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))
|
||||
|
@ -61,7 +61,8 @@ impl Command for Let {
|
||||
input,
|
||||
call.redirect_stdout,
|
||||
call.redirect_stderr,
|
||||
)?;
|
||||
)?
|
||||
.0;
|
||||
|
||||
//println!("Adding: {:?} to {}", rhs, var_id);
|
||||
|
||||
|
1
crates/nu-command/src/env/let_env.rs
vendored
1
crates/nu-command/src/env/let_env.rs
vendored
@ -43,6 +43,7 @@ impl Command for LetEnv {
|
||||
|
||||
let rhs =
|
||||
eval_expression_with_input(engine_state, stack, keyword_expr, input, false, true)?
|
||||
.0
|
||||
.into_value(call.head);
|
||||
|
||||
if env_var == "PWD" {
|
||||
|
Reference in New Issue
Block a user