summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpmq b/urpmq
index 445fd8c2..13e3b10e 100755
--- a/urpmq
+++ b/urpmq
@@ -80,8 +80,9 @@ my $urpm = new urpm;
#- parse arguments list.
my @nextargv;
-for (@ARGV) {
- /^--help$/ and do { usage; next };
+@ARGV or usage;
+while (defined($_ = shift @ARGV)) {
+ /^--help$/ and do { usage };
/^--update$/ and do { $query->{update} = 1; next };
/^--media$/ and do { push @nextargv, \$query->{media}; next };
/^--mediums$/ and do { push @nextargv, \$query->{media}; next };