diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-11-25 15:12:42 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-11-25 15:12:42 +0000 |
commit | 8dd2ab0c514d4e88aa45dad955bf85aa0f713ae0 (patch) | |
tree | c0bb89812901cd826b2b937b693b853f779de6bc /dgit | |
parent | ab3ee70798719db52d33da4f4204fc2943225b7f (diff) |
Complain about lack of cuddled values for value-taking single-letter options, rather than thinking the user meat an empty value. Closes:#763332.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2718,17 +2718,20 @@ sub parseopts () { } elsif (s/^-c(.*=.*)//s) { push @ropts, $&; push @git, '-c', $1; - } elsif (s/^-d(.*)//s) { + } elsif (s/^-d(.+)//s) { push @ropts, $&; $idistro = $1; - } elsif (s/^-C(.*)//s) { + } elsif (s/^-C(.+)//s) { push @ropts, $&; $changesfile = $1; if ($changesfile =~ s#^(.*)/##) { $buildproductsdir = $1; } - } elsif (s/^-k(.*)//s) { + } elsif (s/^-k(.+)//s) { $keyid=$1; + } elsif (m/^-[vdCk]$/) { + badusage + "option \`$_' requires an argument (and no space before the argument)"; } elsif (s/^-wn//s) { push @ropts, $&; $cleanmode = 'none'; |