aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2014-04-27 10:49:29 +0200
committerThijs Schreijer <thijs@thijsschreijer.nl>2014-04-27 10:49:29 +0200
commit635e7e9d504ac69ba10bf318388e590f508137f7 (patch)
tree1693b4bd097f3cc9087d8c82eaf854663a1b6908
parente6243d256fac39dcd217f98c43d3fac1bd32f63b (diff)
downloadluarocks-635e7e9d504ac69ba10bf318388e590f508137f7.tar.gz
luarocks-635e7e9d504ac69ba10bf318388e590f508137f7.tar.bz2
luarocks-635e7e9d504ac69ba10bf318388e590f508137f7.zip
added `--tries=1` to wget to prevent 20 tries (=20 timeouts)
-rw-r--r--src/luarocks/fs/unix/tools.lua2
-rw-r--r--src/luarocks/fs/win32/tools.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua
index 7168cecc..dad42a65 100644
--- a/src/luarocks/fs/unix/tools.lua
+++ b/src/luarocks/fs/unix/tools.lua
@@ -248,7 +248,7 @@ function tools.download(url, filename, cache)
248 if cfg.downloader == "wget" then 248 if cfg.downloader == "wget" then
249 local wget_cmd = vars.WGET.." --no-check-certificate --no-cache --user-agent='"..cfg.user_agent.." via wget' --quiet " 249 local wget_cmd = vars.WGET.." --no-check-certificate --no-cache --user-agent='"..cfg.user_agent.." via wget' --quiet "
250 if cfg.connection_timeout > 0 then 250 if cfg.connection_timeout > 0 then
251 wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." " 251 wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 "
252 end 252 end
253 if cache then 253 if cache then
254 -- --timestamping is incompatible with --output-document, 254 -- --timestamping is incompatible with --output-document,
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua
index df468c5d..f5cbc68b 100644
--- a/src/luarocks/fs/win32/tools.lua
+++ b/src/luarocks/fs/win32/tools.lua
@@ -258,7 +258,7 @@ function tools.download(url, filename, cache)
258 if cfg.downloader == "wget" then 258 if cfg.downloader == "wget" then
259 local wget_cmd = fs.Q(vars.WGET).." --no-check-certificate --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " 259 local wget_cmd = fs.Q(vars.WGET).." --no-check-certificate --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet "
260 if cfg.connection_timeout > 0 then 260 if cfg.connection_timeout > 0 then
261 wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." " 261 wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 "
262 end 262 end
263 if cache then 263 if cache then
264 -- --timestamping is incompatible with --output-document, 264 -- --timestamping is incompatible with --output-document,