diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2016-10-03 12:14:09 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2016-10-03 12:14:09 +0000 |
commit | 6910550b87b5d20cb41dd657d1df34102f4cfe3f (patch) | |
tree | d5504cdf2bb124ac0cd20f8de819ea69d79c35de /usr.sbin/pkg_add/OpenBSD | |
parent | da6a1f24ec0b198186a41fdb59e7a9812883e622 (diff) |
display a decent error message
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgSign.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm index aabbb45aec1..ea83005ce3b 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgSign.pm,v 1.12 2016/10/03 10:59:54 espie Exp $ +# $OpenBSD: PkgSign.pm,v 1.13 2016/10/03 12:14:08 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -120,8 +120,13 @@ sub sign_list $state->{total} = scalar @$l; $maxjobs //= 1; my $code = sub { - my $pkg = $repo->find(shift); - $self->sign_existing_package($state, $pkg); + my $name = shift; + my $pkg = $repo->find($name); + if (!defined $pkg) { + $state->errsay("#1 not found", $name); + } else { + $self->sign_existing_package($state, $pkg); + } }; my $display = $state->verbose ? sub { |