Re: lsb-release: please review for release exception
On Mon, Nov 20, 2006 at 08:53:56AM +0200, Eero Häkkinen wrote:
> > The addition of the [ -z $FANCYTTY ] && FANCYTTY=1 isn't going to work right
> > under set -e; if FANCYTTY is non-empty for whatever reason, then [ -z
> > $FANCYTTY ] returns false -- and short-circuits, causing the function to
> > return false immediately instead of returning true farther down as intended.
> That is not true: set -e has no effect on AND and OR lists.
> That is, if FANCYTTY is non-empty for whatever reason, then [ -z $FANCYTTY ]
> returns false and short-circuits causing the rest of the AND list not to be
> executed. The AND list returns false, but because the AND list is not the
> last command in the function, the return status of the AND list is ignored
> -- even under set -e.
You're right, my mistake; I assumed that set -e caused immediate return
from functions the same way it causes immediate exit of scripts, and this
seems to not be the case.
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.