aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/fs/tools.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/fs/tools.lua b/src/luarocks/fs/tools.lua
index ed51b545..60d1d9ff 100644
--- a/src/luarocks/fs/tools.lua
+++ b/src/luarocks/fs/tools.lua
@@ -104,7 +104,7 @@ function tools.use_downloader(url, filename, cache)
104 if cfg.downloader == "wget" then 104 if cfg.downloader == "wget" then
105 local wget_cmd = fs.Q(vars.WGET).." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " 105 local wget_cmd = fs.Q(vars.WGET).." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet "
106 if cfg.connection_timeout and cfg.connection_timeout > 0 then 106 if cfg.connection_timeout and cfg.connection_timeout > 0 then
107 wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 " 107 wget_cmd = wget_cmd .. "--timeout="..tostring(cfg.connection_timeout).." --tries=1 "
108 end 108 end
109 if cache then 109 if cache then
110 -- --timestamping is incompatible with --output-document, 110 -- --timestamping is incompatible with --output-document,
@@ -120,7 +120,7 @@ function tools.use_downloader(url, filename, cache)
120 elseif cfg.downloader == "curl" then 120 elseif cfg.downloader == "curl" then
121 local curl_cmd = fs.Q(vars.CURL).." "..vars.CURLNOCERTFLAG.." -f -L --user-agent \""..cfg.user_agent.." via curl\" " 121 local curl_cmd = fs.Q(vars.CURL).." "..vars.CURLNOCERTFLAG.." -f -L --user-agent \""..cfg.user_agent.." via curl\" "
122 if cfg.connection_timeout and cfg.connection_timeout > 0 then 122 if cfg.connection_timeout and cfg.connection_timeout > 0 then
123 curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." " 123 curl_cmd = curl_cmd .. "--connect-timeout "..tostring(cfg.connection_timeout).." "
124 end 124 end
125 ok = fs.execute_string(fs.quiet_stderr(curl_cmd..fs.Q(url).." > "..fs.Q(filename))) 125 ok = fs.execute_string(fs.quiet_stderr(curl_cmd..fs.Q(url).." > "..fs.Q(filename)))
126 end 126 end