diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-30 12:38:52 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-30 12:38:52 +0000 |
commit | 7712446b3fd7e3829d563b7211b53449a237b0df (patch) | |
tree | d281f1e5ff1499f7a99c9fe05031d69b7754b417 /usr.sbin/pkg_add/OpenBSD | |
parent | 309e2ffbc559c9d1450be49b342f8fea687b241b (diff) |
don't create empty entries
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/UpdateSet.pm | 8 |
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; } |