From 8397cba3e2a0ba7b6c38d1bff6338673f970bf0f Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 16 Jun 2005 01:24:59 +0000 Subject: urpmf should warn on unknown options --- urpm/args.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'urpm') diff --git a/urpm/args.pm b/urpm/args.pm index 9ed610a5..56d39718 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -169,6 +169,10 @@ my %options_spec = ( # This is for -! -( -) $::expr .= $1; } + elsif ($p =~ /^--?(.+)/) { + # unrecognized option + die "Unknown option: $1\n"; + } else { # This is for non-option arguments. # Assume a regex unless a ++ is inside the string. -- cgit v1.2.1