Thanks for the reply, but it still doesn't seem to run.
I followed the following steps:
1) updated the on_error_stop value to 1
2) Ran a command that should fail and exit
Any particular reason you didn't just add the --set option from #1 to the psql command in #2?
As an aside, the portion of the command "psql -c -a -f <file>" is wrong (though apparently not broken...). You specify, via "c", that you are going to provide a single command for psql to execute but then fail to provide any such command and instead change you mind and tell it your are going to provide a script file, via "f", instead.