From 635e7e9d504ac69ba10bf318388e590f508137f7 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sun, 27 Apr 2014 10:49:29 +0200 Subject: added `--tries=1` to wget to prevent 20 tries (=20 timeouts) --- src/luarocks/fs/unix/tools.lua | 2 +- src/luarocks/fs/win32/tools.lua | 2 +- 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) if cfg.downloader == "wget" then local wget_cmd = vars.WGET.." --no-check-certificate --no-cache --user-agent='"..cfg.user_agent.." via wget' --quiet " if cfg.connection_timeout > 0 then - wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." " + wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 " end if cache then -- --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) if cfg.downloader == "wget" then local wget_cmd = fs.Q(vars.WGET).." --no-check-certificate --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " if cfg.connection_timeout > 0 then - wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." " + wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 " end if cache then -- --timestamping is incompatible with --output-document, -- cgit v1.2.3-55-g6feb