summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-11 12:32:04 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-11 12:32:04 +0000
commitdac9950a04ceb5cf20ea409d31c27659111aebb2 (patch)
treed983be8d3b6ef694f64856b4641376d0aad00dc1 /usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
parent63ddfd51ddaedc7390c3a7435bf25b80b16701d5 (diff)
don't use Warn if we've got a $state, get through errprint/errsay.
Also: reset lastdisplay on clear, and don't clear twice.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/UpdateSet.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index 6502274f7d1..e400f06a115 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.20 2009/11/11 12:21:20 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.21 2009/11/11 12:32:03 espie Exp $
#
# Copyright (c) 2007 Marc Espie <espie@openbsd.org>
#
@@ -139,7 +139,7 @@ sub check_root
my $state = shift;
if ($< && !$state->{defines}->{nonroot}) {
if ($state->{not}) {
- Warn "$0 should be run as root\n";
+ $state->errsay("$0 should be run as root");
} else {
Fatal "$0 must be run as root";
}