Re: [PATCHv2 4/6] t7510: exit for loop with test result
- From
Jeff King <peff@peff.net>
- Date
- Jun 13, 2014, 13:30 UTC
- Message-ID
- <20140613133028.GB18715@sigill.intra.peff.net>
- In-Reply-To
- <539AFAF3.9040707@viscovery.net>
On Fri, Jun 13, 2014 at 03:21:55PM +0200, Johannes Sixt wrote:
Show 12 quoted lines
> I don't think so. What is the outcome of > > false && # simulate a regression > grep foo && exit 1 > ! grep bar || exit 1 > > assuming that the '! grep bar' happens to be true? Answer: The regression > is not diagnosed because the &&-chain is broken. > > *That* is what I think you described earlier in this thread as "I put > something failing on the first line of the original version, and the test > succeeded."
Yeah, I think that is the bit that I was missing from my original confusion.
false && anything || exit 1
_does_ work. But that is not what is written. ;)
Thanks for pointing it out.
-Peff