artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2779f69
)
make sure makewhatis shows error messages without unsightly CODE() refs
author
espie
<espie@openbsd.org>
Sun, 27 Jul 2014 22:19:18 +0000
(22:19 +0000)
committer
espie
<espie@openbsd.org>
Sun, 27 Jul 2014 22:19:18 +0000
(22:19 +0000)
usr.sbin/pkg_add/OpenBSD/State.pm
patch
|
blob
|
history
diff --git
a/usr.sbin/pkg_add/OpenBSD/State.pm
b/usr.sbin/pkg_add/OpenBSD/State.pm
index
89270c1
..
e999eaf
100644
(file)
--- a/
usr.sbin/pkg_add/OpenBSD/State.pm
+++ b/
usr.sbin/pkg_add/OpenBSD/State.pm
@@
-1,5
+1,5
@@
# ex:ts=8 sw=4:
-# $OpenBSD: State.pm,v 1.3
1 2014/07/08 16:52:47
espie Exp $
+# $OpenBSD: State.pm,v 1.3
2 2014/07/27 22:19:18
espie Exp $
#
# Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
#
@@
-432,6
+432,12
@@
sub system
my $self = shift;
my $r = $self->_system(@_);
if ($r != 0) {
+ if (ref $_[0] eq 'CODE') {
+ shift;
+ }
+ if (ref $_[0] eq 'CODE') {
+ shift;
+ }
$self->say("system(#1) failed: #2",
join(", ", @_), $self->child_error);
}