par_psql icon indicating copy to clipboard operation
par_psql copied to clipboard

honor psql's exit status (fixes #6)

Open breunigs opened this issue 3 years ago • 0 comments

The sub-shells exit code wasn't checked, so even if psql exited with a non-zero status code, par_psql would continue. We can check this directly for sequential queries, but need to do some housekeeping for the background processes.

It is possible to exit immediately upon encountering a failed sub-shell, but the later ones might still be running and print into the terminal, leaving a dirty prompt.

The exit code 3 is what psql -v ON_ERROR_STOP=1 returns.

breunigs avatar Mar 24 '23 17:03 breunigs