On Tue, Jun 09, 2015 at 05:57:18PM +0200, Roland Haas wrote:
> $PKGCONFIG --version 2>&1 >/dev/null && : || return
> 
> which is very odd (since the LHS of || istill false iff PKGCONFIG failed).

Yes. I changed this now to

$PKGCONFIG --version >/dev/null 2>&1 || return 0

What I didn't know (anymore?) was that 'return' (without value) in bash
does not return 0 by default, but the exit value of the last command. In
this case the last command failed. We caught it (by testing for it), but
returning non-zero will make the function call fail, unless this is
caught as well, which we don't want.

Frank

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Users mailing list
[email protected]
http://cactuscode.org/mailman/listinfo/users

Reply via email to