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

Commit b44fc39

Browse files
committed
pg_dump: make argument combination error exit code consistent
Per report from Pavel Golub
1 parent f1ba94b commit b44fc39

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bin/pg_dump/pg_dump.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,16 @@ main(int argc, char **argv)
563563
dump_inserts = 1;
564564

565565
if (dataOnly && schemaOnly)
566-
exit_horribly(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
566+
{
567+
write_msg(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
568+
exit_nicely(1);
569+
}
567570

568571
if (dataOnly && outputClean)
569-
exit_horribly(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
572+
{
573+
write_msg(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
574+
exit_nicely(1);
575+
}
570576

571577
if (dump_inserts && oids)
572578
{

0 commit comments

Comments
 (0)