summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2011-06-05 00:31:49 +0200
committerRaphaël Hertzog <hertzog@debian.org>2011-06-05 09:01:15 +0200
commitb3d0bb4a4cb8a994d3841912dccd116224498f32 (patch)
tree685828f6c6b00e393649d181e5d26199465fd05b /scripts
parent53af7e486a194fb005beb24873e5fb276e84b42c (diff)
downloaddpkg-b3d0bb4a4cb8a994d3841912dccd116224498f32.tar.gz
dpkg-vendor: fail on missing parameters for required arguments
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dpkg-vendor.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/dpkg-vendor.pl b/scripts/dpkg-vendor.pl
index f59f4c633..f1dabe358 100755
--- a/scripts/dpkg-vendor.pl
+++ b/scripts/dpkg-vendor.pl
@@ -61,11 +61,13 @@ while (@ARGV) {
$_ = shift(@ARGV);
if (m/^--vendor$/) {
$vendor = shift(@ARGV);
+ usageerr(_g("%s needs a parameter"), $_) unless defined $vendor;
} elsif (m/^--(is|derives-from|query)$/) {
usageerr(_g("two commands specified: --%s and --%s"), $1, $action)
if defined($action);
$action = $1;
$param = shift(@ARGV);
+ usageerr(_g("%s needs a parameter"), $_) unless defined $param;
} elsif (m/^-(h|-help)$/) {
usage();
exit 0;