summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-26 15:45:54 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-26 15:45:54 +0000
commitde7acdb4096997634ed3e459bc1e909f59b9c0ce (patch)
tree1ef5233e0626618ab6d48fc7e8af1bd63e0fe4e6 /urpm/args.pm
parentaa5b090a1c105963889a73afe8fc303b5b544f01 (diff)
downloadurpmi-de7acdb4096997634ed3e459bc1e909f59b9c0ce.tar
urpmi-de7acdb4096997634ed3e459bc1e909f59b9c0ce.tar.gz
urpmi-de7acdb4096997634ed3e459bc1e909f59b9c0ce.tar.bz2
urpmi-de7acdb4096997634ed3e459bc1e909f59b9c0ce.tar.xz
urpmi-de7acdb4096997634ed3e459bc1e909f59b9c0ce.zip
Allow to ask user for proxy credentials
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 4e8440e2..9fe53476 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -97,9 +97,13 @@ my %options_spec = (
},
'proxy-user=s' => sub {
my (undef, $value) = @_;
- $value =~ /(.+):(.+)/ or die N("bad proxy declaration on command line\n");
- @{$urpm->{proxy}}{qw(user pwd)} = ($1, $2); #- obsolete, for compat
- urpm::download::set_cmdline_proxy(user => $1, pwd => $2);
+ if ($value eq 'ask') { #- should prompt for user/password
+ urpm::download::set_cmdline_proxy(ask => 1);
+ } else {
+ $value =~ /(.+):(.+)/ or die N("bad proxy declaration on command line\n");
+ @{$urpm->{proxy}}{qw(user pwd)} = ($1, $2); #- obsolete, for compat
+ urpm::download::set_cmdline_proxy(user => $1, pwd => $2);
+ }
},
'bug=s' => \$options{bug},
'env=s' => \$::env,