mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 23:23:12 +01:00
corrected error check
This commit is contained in:
parent
2ea19aeac0
commit
9a16a8fd06
@ -2610,7 +2610,10 @@ pub fn parse_block(
|
||||
.iter()
|
||||
.map(|command| {
|
||||
let (expr, err) = parse_expression(working_set, &command.parts);
|
||||
error = err.map(|err| err);
|
||||
|
||||
if error.is_none() {
|
||||
error = err;
|
||||
}
|
||||
|
||||
expr
|
||||
})
|
||||
@ -2621,7 +2624,10 @@ pub fn parse_block(
|
||||
})
|
||||
} else {
|
||||
let (stmt, err) = parse_statement(working_set, &pipeline.commands[0].parts);
|
||||
error = err.map(|err| err);
|
||||
|
||||
if error.is_none() {
|
||||
error = err;
|
||||
}
|
||||
|
||||
stmt
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user