aboutsummaryrefslogtreecommitdiff
path: root/wget.patch
blob: 11d46d464429cdabc6e3523b8bf677efaa8c86ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/src/luarocks/fs/tools.lua
+++ b/src/luarocks/fs/tools.lua
@@ -153,6 +153,7 @@ end
 function tools.use_downloader(url, filename, cache)
    assert(type(url) == "string")
    assert(type(filename) == "string" or not filename)
+   cache = false

    filename = fs.absolute_name(filename or dir.base_name(url))

@@ -163,7 +164,7 @@ function tools.use_downloader(url, filename, cache)

    local ok = false
    if downloader == "wget" then
-      local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet "
+      local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." -U \""..cfg.user_agent.." via wget\" -q "
       if cfg.connection_timeout and cfg.connection_timeout > 0 then
         wget_cmd = wget_cmd .. "--timeout="..tostring(cfg.connection_timeout).." --tries=1 "
       end
@@ -175,7 +176,7 @@ function tools.use_downloader(url, filename, cache)
          ok = fs.execute_quiet(wget_cmd.." --timestamping ", url)
          fs.pop_dir()
       elseif filename then
-         ok = fs.execute_quiet(wget_cmd.." --output-document ", filename, url)
+         ok = fs.execute_quiet(wget_cmd.." -O", filename, url)
       else
          ok = fs.execute_quiet(wget_cmd, url)
       end