summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2012-07-28 08:50:07 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2012-07-28 08:50:07 +0000
commit359cbc8f99d3ac57fe5b014bb85dde0d95eb9b2d (patch)
treeaf1198fe6352cfde38c0c817df27233464c51c3b /usr.bin
parent8c369ad657733a434abe29398a4fa99d4e31dcc2 (diff)
Return a proper error message when we end up needed to parse
packages, but none were provided. Similar to what fd.o does.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/pkg-config/pkg-config9
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;