Skip to content

Commit 653615b

Browse files
author
Artur Zakirov
committed
Return 0 for --help and --version commands
1 parent 8bd2248 commit 653615b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pg_probackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <time.h>
1717
#include <sys/stat.h>
1818

19-
const char *PROGRAM_VERSION = "1.0.2";
19+
const char *PROGRAM_VERSION = "1.0.3";
2020
const char *PROGRAM_URL = "https://github.com/postgrespro/pg_probackup";
2121
const char *PROGRAM_EMAIL = "https://github.com/postgrespro/pg_probackup/issues";
2222

pgut/pgut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,12 +614,12 @@ pgut_getopt(int argc, char **argv, pgut_option options[])
614614
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
615615
{
616616
help(true);
617-
exit_or_abort(1);
617+
exit_or_abort(0);
618618
}
619619
if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
620620
{
621621
fprintf(stderr, "%s %s\n", PROGRAM_NAME, PROGRAM_VERSION);
622-
exit_or_abort(1);
622+
exit_or_abort(0);
623623
}
624624
}
625625

tests/expected/option_version.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pg_probackup 1.0.2
1+
pg_probackup 1.0.3

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy