mirror of
https://github.com/nushell/nushell.git
synced 2025-08-23 04:31:26 +02:00
Revert "Pipeline operators: &&
and ||
" (#7452)
Reverts nushell/nushell#7448 Some surprising behavior in how we do this. For example: ``` 〉if (true || false) { print "yes!" } else { print "no!" } no! 〉if (true or false) { print "yes!" } else { print "no!" } yes! ``` This means for folks who are using the old `||`, they possibly get the wrong answer once they upgrade. I don't think we can ship with that as it will catch too many people by surprise and just make it easier to write buggy code.
This commit is contained in:
@@ -1420,9 +1420,7 @@ pub fn parse_module_block(
|
||||
|
||||
pipeline
|
||||
}
|
||||
LiteElement::Redirection(_, _, command) | LiteElement::Or(_, command) => {
|
||||
garbage_pipeline(&command.parts)
|
||||
}
|
||||
LiteElement::Redirection(_, _, command) => garbage_pipeline(&command.parts),
|
||||
}
|
||||
} else {
|
||||
error = Some(ParseError::Expected("not a pipeline".into(), span));
|
||||
|
Reference in New Issue
Block a user