summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-11-20 10:52:15 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-11-20 10:52:15 +0000
commit7d0a4078b2166d49afa564252fecd5deb5170d05 (patch)
tree83305bfbb98394e693edfc765ca8d6dc3bf214c2 /usr.sbin/pkg_add
parent2e8cde6b1787ff4ee87a7c657f6c4a0ed724ef50 (diff)
for the -r option, if we already set an error code (like in -e), reuse that.
allows pkg_info -e 'gettext->=0.20' -r 'gettext->=0.10.38' gettext-0.18.1p0 in one go.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgInfo.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm
index c8a26d7ef3c..2fcd2b295e5 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgInfo.pm,v 1.22 2011/08/18 07:55:26 espie Exp $
+# $OpenBSD: PkgInfo.pm,v 1.23 2011/11/20 10:52:14 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -507,7 +507,7 @@ sub parse_and_run
join(' ', @l));
}
if (@l != 0) {
- return 0;
+ return $exit_code;
} else {
return 1;
}