Tweak for initdb: if more command-line arguments were specified than
authorNeil Conway <neilc@samurai.com>
Sat, 4 Aug 2007 21:01:09 +0000 (21:01 +0000)
committerNeil Conway <neilc@samurai.com>
Sat, 4 Aug 2007 21:01:09 +0000 (21:01 +0000)
expected, exit with an error, rather than complaining about the error
on stderr but continuing onward.

src/bin/initdb/initdb.c

index 796e07c65c8355c74dc8f63e73cf889637d2d1b7..77387f4243cbecfc46940d5ba5a6d2f442c85c13 100644 (file)
@@ -2583,6 +2583,7 @@ main(int argc, char *argv[])
                                progname, argv[optind + 1]);
                fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
                                progname);
+               exit(1);
        }
 
        if (pwprompt && pwfilename)