diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-03-22 11:02:53 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-03-22 11:02:53 -0300 |
commit | 4ba18e4d0a573ada71b99fc16da9d21e61628947 (patch) | |
tree | 9041a7b449e3724ac1352c7a636f1b0cf5e2a239 /src | |
parent | c55a52b0eaa753ed00d12b6553777b9ab913101d (diff) | |
download | luarocks-4ba18e4d0a573ada71b99fc16da9d21e61628947.tar.gz luarocks-4ba18e4d0a573ada71b99fc16da9d21e61628947.tar.bz2 luarocks-4ba18e4d0a573ada71b99fc16da9d21e61628947.zip |
Handle case when fs.download returns no error message
(External programs output their own error messages.)
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fetch.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index ff77882e..2ea2c906 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua | |||
@@ -32,7 +32,7 @@ function fetch_url(url, filename) | |||
32 | elseif protocol == "http" or protocol == "ftp" or protocol == "https" then | 32 | elseif protocol == "http" or protocol == "ftp" or protocol == "https" then |
33 | local ok, err = fs.download(url, filename) | 33 | local ok, err = fs.download(url, filename) |
34 | if not ok then | 34 | if not ok then |
35 | return nil, "Failed downloading "..url.." - "..err, "network" | 35 | return nil, "Failed downloading "..url..(err and " - "..err or ""), "network" |
36 | end | 36 | end |
37 | return dir.path(fs.current_dir(), filename or dir.base_name(url)) | 37 | return dir.path(fs.current_dir(), filename or dir.base_name(url)) |
38 | else | 38 | else |