diff options
author | Frans Pop <fjp@debian.org> | 2008-01-19 09:12:44 (GMT) |
---|---|---|
committer | Frans Pop <fjp@debian.org> | 2008-01-19 09:12:44 (GMT) |
commit | 4434a5e47ad1b53cec50068d60b19454ef8b96dc (patch) | |
tree | 0482f16747fe2912532ced6589fc1e190f44e895 | |
parent | 065b67e0d139f92f6c3662b67ac9707f72e3a77c (diff) | |
download | debootstrap-4434a5e47ad1b53cec50068d60b19454ef8b96dc.zip debootstrap-4434a5e47ad1b53cec50068d60b19454ef8b96dc.tar.gz debootstrap-4434a5e47ad1b53cec50068d60b19454ef8b96dc.tar.bz2 |
Error out on unrecognized options
Currently debootstrap just breaks out of the loop on an unrecognized
option which means that that option and anything following it will be
taken as arguments leading to weird failures later.
Better to error out instead.
r50953
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | debootstrap | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 80922a6..27b37d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debootstrap (1.0.9) UNRELEASED; urgency=low + + * Error out on unrecognized options to avoid invalid options to be + recognized as arguments. + + -- Frans Pop <fjp@debian.org> Sat, 19 Jan 2008 10:05:26 +0100 + debootstrap (1.0.8) unstable; urgency=low [ Frans Pop ] diff --git a/debootstrap b/debootstrap index 7ea65e5..0e1b10e 100755 --- a/debootstrap +++ b/debootstrap @@ -280,6 +280,9 @@ if [ $# != 0 ] ; then error 1 NEEDARG "option requires an argument %s" "$1" fi ;; + --*) + error 1 BADARG "unrecognized or invalid option %s" "$1" + ;; *) break ;; |