aboutsummaryrefslogtreecommitdiff
path: root/wget.patch
diff options
context:
space:
mode:
Diffstat (limited to 'wget.patch')
-rw-r--r--wget.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/wget.patch b/wget.patch
new file mode 100644
index 0000000..11d46d4
--- /dev/null
+++ b/wget.patch
@@ -0,0 +1,29 @@
1--- a/src/luarocks/fs/tools.lua
2+++ b/src/luarocks/fs/tools.lua
3@@ -153,6 +153,7 @@ end
4 function tools.use_downloader(url, filename, cache)
5 assert(type(url) == "string")
6 assert(type(filename) == "string" or not filename)
7+ cache = false
8
9 filename = fs.absolute_name(filename or dir.base_name(url))
10
11@@ -163,7 +164,7 @@ function tools.use_downloader(url, filename, cache)
12
13 local ok = false
14 if downloader == "wget" then
15- local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet "
16+ local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." -U \""..cfg.user_agent.." via wget\" -q "
17 if cfg.connection_timeout and cfg.connection_timeout > 0 then
18 wget_cmd = wget_cmd .. "--timeout="..tostring(cfg.connection_timeout).." --tries=1 "
19 end
20@@ -175,7 +176,7 @@ function tools.use_downloader(url, filename, cache)
21 ok = fs.execute_quiet(wget_cmd.." --timestamping ", url)
22 fs.pop_dir()
23 elseif filename then
24- ok = fs.execute_quiet(wget_cmd.." --output-document ", filename, url)
25+ ok = fs.execute_quiet(wget_cmd.." -O", filename, url)
26 else
27 ok = fs.execute_quiet(wget_cmd, url)
28 end
29