summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 9e7164bf..d6790d42 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -226,7 +226,7 @@ sub sync_wget {
my $options = shift @_;
my ($buf, $file) = ('', undef);
open WGET, "-|", "/usr/bin/wget",
- (ref $options && set_proxy({type => "wget", proxy => $options->{proxy}})),
+ (ref $options && $options->{proxy} ? set_proxy({type => "wget", proxy => $options->{proxy}}) : ()),
(ref $options && $options->{callback} ? ("--progress=bar:force", "-o", "-") :
ref $options && $options->{quiet} ? ("-q") : ("")),
"--retr-symlinks", "-NP",
@@ -271,7 +271,7 @@ sub sync_curl {
#- prepare to get back size and time stamp of each file.
open CURL, "/usr/bin/curl" .
- " " . (ref $options && set_proxy({type => "curl", proxy => $options->{proxy}})) .
+ " " . (ref $options && $options->{proxy} ? set_proxy({type => "curl", proxy => $options->{proxy}}) : ()) .
" -s -I " . join(" ", map { "'$_'" } @ftp_files) . " |";
while (<CURL>) {
if (/Content-Length:\s*(\d+)/) {