Re: [PATCH] filter-branch: get rid of "set -e"
- From
David Kastrup <dak@gnu.org>
- Date
- Jul 18, 2007, 13:27 UTC
- Message-ID
- <86vechj0zz.fsf@lola.quinscape.zz>
- In-Reply-To
- <Pine.LNX.4.64.0707181416050.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> It was reported by Alex Riesen that "set -e" can break something as > trivial as "unset CDPATH" in bash.
Not in bash. Just tried it. But there are Bourne shells that do get annoyed.
> So get rid of "set -e".
I'd rather write
[ "X$CDPATH" = "X" ] || unset CDPATH
With regard to shells, there is an interesting document (info "(autoconf) Portable Shell") which is rather disillusioning.
A real horror show is (info "(autoconf) Limitations of Builtins") where one learns that using if without else can lead to bad exit status, too.
-- David Kastrup