summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-01-29 03:40:37 +0100
committerAllan McRae <allan@archlinux.org>2014-01-30 04:12:00 +0100
commitaabb7c3cddf5e97d1b1ebb3548664f1af85c1392 (patch)
tree6a63a4ee459fdb191d02d471232737a6285609ba /src/pacman/pacman.c
parent7ae25ac67fd4dd087791be55fa3c4997be7aac52 (diff)
downloadpacman-aabb7c3cddf5e97d1b1ebb3548664f1af85c1392.tar.gz
pacman-aabb7c3cddf5e97d1b1ebb3548664f1af85c1392.tar.xz
pacman: use exit status 0 for --help and --version
The user requesting usage or version information is not an error. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 71443394..8c76987e 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -889,11 +889,11 @@ static int parseargs(int argc, char *argv[])
}
if(config->help) {
usage(config->op, mbasename(argv[0]));
- return 2;
+ cleanup(0);
}
if(config->version) {
version();
- return 2;
+ cleanup(0);
}
/* parse all other options */