Closed kirly-af closed 8 years ago
Doesn't the built-in or operator work the same way? ||
Is supported on UNIX and windows, I didn't see any difference in its behavior as far as I remember
To clarify, I think this should be achievable with shx cp foo bar || shx rm -r mightNotExist || someExternalCommand || ...
. The same should be the case with &&
.
If this is supported by UNIX and Windows already, I'd rather defer to what the OS does. If this is inconsistent however, we can look at what it would take to put it in this project.
My bad, I was convinced ||
didn't exist on Windows. It turns out it's definitely working.
No worries. Glad it worked out for you!
It would be very convenient to have a portable OR operator. I have no idea about the syntax, maybe a
--or
flag:would execute: