diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-07-27 22:19:19 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-07-27 22:19:19 +0000 |
commit | ea8200ec3f86e3c61fba44f9e16d787c932f6585 (patch) | |
tree | a1c9f90bcfe8b3670a9d8f351cd092ee9d68a82f /usr.sbin/pkg_add/OpenBSD/State.pm | |
parent | acf15b9c8c3ae4029ff4b8fe06138b806d5beaf5 (diff) |
make sure makewhatis shows error messages without unsightly CODE() refs
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/State.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 89270c1a6da..e999eaf4ac5 100644 --- 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.31 2014/07/08 16:52:47 espie Exp $ +# $OpenBSD: State.pm,v 1.32 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); } |