Re: [PATCH] test-lib.sh: work around ksh's trap shortcomings
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Aug 19, 2008, 01:27 UTC
- Message-ID
- <cqiOMMbzSSjqZoLDEa5uscl2d0D71PrGu2TpSOULLuV5nTVnEEWCzQ@cipher.nrlssc.navy.mil>
- In-Reply-To
- <7vbpzplw9o.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
> Your alias test_done that calls function test_done look ugly and confusing > beyond words. Perhaps test_done() can instead set a global variable and > die() can notice it instead, like this? I haven't bothered to change the > other "trap - exit" but I think you got the idea...
Yes that works and is much clearer. Tested on solaris and irix.
-brandon