diff options
author | 2012-07-28 08:50:06 +0000 | |
---|---|---|
committer | 2012-07-28 08:50:06 +0000 | |
commit | 42858c689dfdb728e4467409b03f4d4fc747bef7 (patch) | |
tree | f364f5d0d1f4ebd2b9b6d6f34009d29865f87cad | |
parent | Fix initializer botch introduced in r1.20 when 'oldval' field was (diff) | |
download | wireguard-openbsd-42858c689dfdb728e4467409b03f4d4fc747bef7.tar.xz wireguard-openbsd-42858c689dfdb728e4467409b03f4d4fc747bef7.zip |
Return a proper error message when we end up needed to parse
packages, but none were provided. Similar to what fd.o does.
-rw-r--r-- | usr.bin/pkg-config/pkg-config | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config index dd51e980634..26aa23bcb8e 100644 --- a/usr.bin/pkg-config/pkg-config +++ b/usr.bin/pkg-config/pkg-config @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: pkg-config,v 1.72 2012/07/04 08:44:07 espie Exp $ +# $OpenBSD: pkg-config,v 1.73 2012/07/28 08:50:06 jasper Exp $ # $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $ # Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org> @@ -154,6 +154,13 @@ if ($mode{list}) { my $cfg_full_list = []; my $top_config = []; +# When we got here we're supposed to have had at least one +# package as argument. +if (!@ARGV){ + say_error("No package name(s) specified."); + exit 1; +} + while (@ARGV){ my $p = shift @ARGV; my $op = undef; |