Comment 8 for bug 1103343

Jeff Lane (bladernr) wrote :

One last thing to fix, I think because the command as listed still will return an incorrect code.

bladernr@klaatu:~/development/1103343-rendercheck-test-fix$ ( true && echo "True" ) || ( echo "False" && false )
True
bladernr@klaatu:~/development/1103343-rendercheck-test-fix$ echo $?
0
bladernr@klaatu:~/development/1103343-rendercheck-test-fix$ ( false && echo "True" ) || ( echo "False" && false )
False
bladernr@klaatu:~/development/1103343-rendercheck-test-fix$ echo $?
1

so this should work:

( command && echo "Success" ) || ( echo "Failure" && false )