summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index 7283ecf950a..3e09fc74866 100644
--- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
+++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: UpdateSet.pm,v 1.70 2012/09/06 09:07:50 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.71 2014/01/30 12:38:51 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -105,8 +105,10 @@ sub cleanup
for my $h ($self->all_handles) {
$h->cleanup($error, $errorinfo);
}
- $self->{error} //= $error;
- $self->{errorinfo} //= $errorinfo;
+ if (defined $error) {
+ $self->{error} //= $error;
+ $self->{errorinfo} //= $errorinfo;
+ }
$self->mark_as_finished;
}