diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-06 12:00:11 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-06 12:00:11 +0300 |
commit | 7bd6fb90e7afea5e0d1af24cc9ef8acb8ddd70f5 (patch) | |
tree | f0c9cb05c51490fa34f44dee3da997af1c36c3f1 | |
parent | ea996af22f831d4772a84ca4f6da2eae2287fcba (diff) | |
download | luarocks-7bd6fb90e7afea5e0d1af24cc9ef8acb8ddd70f5.tar.gz luarocks-7bd6fb90e7afea5e0d1af24cc9ef8acb8ddd70f5.tar.bz2 luarocks-7bd6fb90e7afea5e0d1af24cc9ef8acb8ddd70f5.zip |
fetch, api fix
-rw-r--r-- | src/luarocks/fetch.lua | 4 | ||||
-rw-r--r-- | src/luarocks/fetch.tl | 4 | ||||
-rw-r--r-- | src/luarocks/upload/api.lua | 4 | ||||
-rw-r--r-- | src/luarocks/upload/api.tl | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index 0277657b..4e0aa89a 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua | |||
@@ -111,8 +111,8 @@ local function download_with_mirrors(url, filename, cache, servers) | |||
111 | if i > idx then | 111 | if i > idx then |
112 | util.warning("Failed downloading. Attempting mirror at " .. try_url) | 112 | util.warning("Failed downloading. Attempting mirror at " .. try_url) |
113 | end | 113 | end |
114 | local ok, name, from_cache = fs.download(try_url, filename, cache) | 114 | local name, _, _, from_cache = fs.download(try_url, filename, cache) |
115 | if ok then | 115 | if name then |
116 | return name, nil, nil, from_cache | 116 | return name, nil, nil, from_cache |
117 | else | 117 | else |
118 | err = err .. name .. "\n" | 118 | err = err .. name .. "\n" |
diff --git a/src/luarocks/fetch.tl b/src/luarocks/fetch.tl index 2d7ae15a..fa084507 100644 --- a/src/luarocks/fetch.tl +++ b/src/luarocks/fetch.tl | |||
@@ -52,8 +52,8 @@ local function download_with_mirrors(url: string, filename: string, cache: boole | |||
52 | if i > idx then | 52 | if i > idx then |
53 | util.warning("Failed downloading. Attempting mirror at " .. try_url) | 53 | util.warning("Failed downloading. Attempting mirror at " .. try_url) |
54 | end | 54 | end |
55 | local ok, name, from_cache = fs.download(try_url, filename, cache) | 55 | local name, _, _, from_cache = fs.download(try_url, filename, cache) |
56 | if ok then | 56 | if name then |
57 | return ok, name, from_cache | 57 | return ok, name, from_cache |
58 | else | 58 | else |
59 | err = err .. name .. "\n" | 59 | err = err .. name .. "\n" |
diff --git a/src/luarocks/upload/api.lua b/src/luarocks/upload/api.lua index eea1eb7b..457e45f5 100644 --- a/src/luarocks/upload/api.lua +++ b/src/luarocks/upload/api.lua | |||
@@ -134,8 +134,8 @@ if not ltn12_ok then | |||
134 | return nil, "API failure: " .. redact_api_url(url) | 134 | return nil, "API failure: " .. redact_api_url(url) |
135 | end | 135 | end |
136 | else | 136 | else |
137 | local ok, err = fs.download(url, tmpfile) | 137 | local name, err = fs.download(url, tmpfile) |
138 | if not ok then | 138 | if not name then |
139 | return nil, "API failure: " .. tostring(err) .. " - " .. redact_api_url(url) | 139 | return nil, "API failure: " .. tostring(err) .. " - " .. redact_api_url(url) |
140 | end | 140 | end |
141 | end | 141 | end |
diff --git a/src/luarocks/upload/api.tl b/src/luarocks/upload/api.tl index 33a97701..6863f6f0 100644 --- a/src/luarocks/upload/api.tl +++ b/src/luarocks/upload/api.tl | |||
@@ -134,8 +134,8 @@ if not ltn12_ok then -- If not using LuaSocket and/or LuaSec... | |||
134 | return nil, "API failure: " .. redact_api_url(url) | 134 | return nil, "API failure: " .. redact_api_url(url) |
135 | end | 135 | end |
136 | else | 136 | else |
137 | local ok, err = fs.download(url, tmpfile) | 137 | local name, err = fs.download(url, tmpfile) |
138 | if not ok then | 138 | if not name then |
139 | return nil, "API failure: " .. tostring(err) .. " - " .. redact_api_url(url) | 139 | return nil, "API failure: " .. tostring(err) .. " - " .. redact_api_url(url) |
140 | end | 140 | end |
141 | end | 141 | end |