summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_add9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 06f5c590918..ac1543a4dbb 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.29 2004/03/18 16:49:50 tholo Exp $
+# $OpenBSD: pkg_add,v 1.30 2004/03/30 08:55:56 espie Exp $
#
# Copyright (c) 2003 Marc Espie.
#
@@ -478,7 +478,12 @@ sub really_add($$)
$plist->{done} = [];
for my $item (@{$plist->{items}}) {
- $item->install($handle, $destdir, $opt_v, $opt_n);
+ eval { $item->install($handle, $destdir, $opt_v, $opt_n); };
+ if ($@) {
+ print STDERR "$@";
+ $errors++;
+ last;
+ }
push(@{$plist->{done}}, $item);
last if $interrupted;
}