diff options
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index d4c012965d1..5cb0d6144fc 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.226 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: pkg_add,v 1.227 2007/04/21 09:57:22 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -761,9 +761,14 @@ if ($opt_u) { my @cantupdate = OpenBSD::Update::find(\@ARGV, \@todo, $state); if (@cantupdate > 0) { print "Cannot find updates for ", join(' ', @cantupdate), "\n"; - unless ($state->{forced}->{alwaysupdate} || - OpenBSD::Interactive::confirm("Proceed", $state->{interactive}, 0)) { + if ($state->{forced}->{alwaysupdate} || + $state->{full_update} && !$state->{interactive}) { + print "Proceeding anyways\n"; + } else { + if (!OpenBSD::Interactive::confirm("Proceed", + $state->{interactive}, 0)) { exit(1); + } } } if (defined $state->{issues}) { |