From 4434a5e47ad1b53cec50068d60b19454ef8b96dc Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Sat, 19 Jan 2008 09:12:44 +0000 Subject: 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 --- debian/changelog | 7 +++++++ debootstrap | 3 +++ 2 files changed, 10 insertions(+) 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 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 ;; -- cgit v0.12