Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a89f973

Browse files
committed
Have pg_dumpall return proper status on exit
1 parent e66f5c0 commit a89f973

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/pg_dump/pg_dumpall

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,9 @@ do
5252
echo "${BS}connect template1 $POSTGRES_USER"
5353
echo "create database $DATABASE;"
5454
echo "${BS}connect $DATABASE $POSTGRES_USER"
55-
pg_dump "$@" $DATABASE || echo "pg_dump failed on $DATABASE" 1>&2
55+
pg_dump "$@" $DATABASE
56+
if [ "$?" -ne 0 ]
57+
then echo "pg_dump failed on $DATABASE, exiting" 1>&2
58+
exit 1
59+
fi
5660
done

0 commit comments

Comments
 (0)