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