diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-05-22 16:41:52 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-05-22 16:41:52 +0000 |
commit | 7427d4349bfd1c4c600ad98d414b4dcc016e59fd (patch) | |
tree | 77c6f62df6e78033998dc877d7949af4787af2fc | |
parent | a0ed6dec72f01714a994fd8a5999fddc4281cec6 (diff) | |
download | rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar.gz rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar.bz2 rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar.xz rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.zip |
workaround crash due to option abuse (#30817)
-rwxr-xr-x | Rpmdrake/init.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm index d01c36a4..98c3db64 100755 --- a/Rpmdrake/init.pm +++ b/Rpmdrake/init.pm @@ -98,6 +98,13 @@ foreach (@ARGV) { } } +foreach my $option (qw(media mode parallel pkg-nosel pkg-sel search)) { + if (defined $options{$option} && !ref($options{$option})) { + warn "wrong usage of \"$option\" option!\n"; + exit(-1); # too early for my_exit() + } +} + our $MODE = ref $options{mode} ? $options{mode}[0] : undef; unless ($MODE) { $MODE = 'install'; |