in reply to Pipe and return status through an "ssh"
As the previous reply hints at, it has nothing to do with the ssh and everything with the ||. You can verify that it behaves the same way on a shell command line:
:/tmp/t # false; echo $? 1 :/tmp/t # false || echo FAIL; echo $? FAIL 0
So either just remove the || echo FAIL part, or make it something like || { echo FAIL; exit 1 }
|
|---|