diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-12 22:41:24 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-12 22:41:24 -0200 |
commit | 1885a7f7100c2ec135878ab29ebb5f09da3b7507 (patch) | |
tree | f9c0c48e6d77733cd73035c0c2a39962748668b3 | |
parent | f74346e6433982a02012ea3070ef114258503da3 (diff) | |
download | luarocks-1885a7f7100c2ec135878ab29ebb5f09da3b7507.tar.gz luarocks-1885a7f7100c2ec135878ab29ebb5f09da3b7507.tar.bz2 luarocks-1885a7f7100c2ec135878ab29ebb5f09da3b7507.zip |
Improve error checking
-rw-r--r-- | src/luarocks/upload/api.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/luarocks/upload/api.lua b/src/luarocks/upload/api.lua index c5883355..97c3598e 100644 --- a/src/luarocks/upload/api.lua +++ b/src/luarocks/upload/api.lua | |||
@@ -156,6 +156,9 @@ function Api:request(url, params, post_params) | |||
156 | curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." " | 156 | curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." " |
157 | end | 157 | end |
158 | ok = fs.execute_string(curl_cmd..fs.Q(url).." -o "..fs.Q(tmpfile)) | 158 | ok = fs.execute_string(curl_cmd..fs.Q(url).." -o "..fs.Q(tmpfile)) |
159 | if not ok then | ||
160 | return nil, "API failure: " .. tostring(url) | ||
161 | end | ||
159 | else | 162 | else |
160 | local ok, err = fs.download(url, tmpfile) | 163 | local ok, err = fs.download(url, tmpfile) |
161 | if not ok then | 164 | if not ok then |