reproducible: common.sh: error out when `psql` fails

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent c8b887fe
......@@ -13,12 +13,12 @@ export PGDATABASE=reproducibledb
# query reproducible database
query_db() {
psql -t --no-align -c "$@"
psql -t --no-align -c "$@" || exit 1
}
# query reproducible database, output to csv format
query_to_csv() {
psql -c "COPY ($@) to STDOUT with csv DELIMITER ','"
psql -c "COPY ($@) to STDOUT with csv DELIMITER ','" || exit 1
}
# common variables
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment