autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'set -e' and 'if eval false' exits with BSD sh


From: Paul Eggert
Subject: Re: 'set -e' and 'if eval false' exits with BSD sh
Date: Mon, 06 Nov 2006 09:08:34 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> -does not print @samp{two}.  One workaround is to use @samp{if test -n
> -"$foo"; then exit 1; fi} rather than @samp{test -n "$foo" && exit 1}.
> -Another possibility is to warn @acronym{BSD} users not to use @samp{sh -e}.
> +does not print @samp{two}.  One workaround is to use @samp{if false; then
> +exit 1; fi} rather than @samp{false && exit 1}.  Another possibility is to
> +warn @acronym{BSD} users not to use @samp{sh -e}.

I'd vote against this particular patch, as the suggested workaround is
weird: nobody would actually write "if false; then exit 1; fi" in a
real shell script.  Perhaps we should just leave it alone, as the
overall point is fairly clear.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]