diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-17 16:25:36 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-18 11:24:07 -0300 |
commit | 07b6abbd78f5eb05b7abfdc34d167321a53a22d3 (patch) | |
tree | 8293e790000f403b3b689259e008597e1ee2597f | |
parent | 54eb415216c367becbf1abe288e50d5758831011 (diff) | |
download | luarocks-07b6abbd78f5eb05b7abfdc34d167321a53a22d3.tar.gz luarocks-07b6abbd78f5eb05b7abfdc34d167321a53a22d3.tar.bz2 luarocks-07b6abbd78f5eb05b7abfdc34d167321a53a22d3.zip |
forward error messages from fs.unzip
-rw-r--r-- | src/luarocks/fetch.lua | 4 | ||||
-rw-r--r-- | src/luarocks/manif.lua | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index 074b0e45..4031ec66 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua | |||
@@ -155,9 +155,9 @@ function fetch.fetch_and_unpack_rock(rock_file, dest) | |||
155 | end | 155 | end |
156 | local ok, err = fs.change_dir(unpack_dir) | 156 | local ok, err = fs.change_dir(unpack_dir) |
157 | if not ok then return nil, err end | 157 | if not ok then return nil, err end |
158 | ok = fs.unzip(rock_file) | 158 | ok, err = fs.unzip(rock_file) |
159 | if not ok then | 159 | if not ok then |
160 | return nil, "Failed unpacking rock file: " .. rock_file | 160 | return nil, "Failed unpacking rock file: " .. rock_file .. ": " .. err |
161 | end | 161 | end |
162 | fs.pop_dir() | 162 | fs.pop_dir() |
163 | return unpack_dir | 163 | return unpack_dir |
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua index d6980299..0bef6f13 100644 --- a/src/luarocks/manif.lua +++ b/src/luarocks/manif.lua | |||
@@ -132,12 +132,12 @@ function manif.load_manifest(repo_url, lua_version) | |||
132 | fs.change_dir(dirname) | 132 | fs.change_dir(dirname) |
133 | local nozip = pathname:match("(.*)%.zip$") | 133 | local nozip = pathname:match("(.*)%.zip$") |
134 | fs.delete(nozip) | 134 | fs.delete(nozip) |
135 | local ok = fs.unzip(pathname) | 135 | local ok, err = fs.unzip(pathname) |
136 | fs.pop_dir() | 136 | fs.pop_dir() |
137 | if not ok then | 137 | if not ok then |
138 | fs.delete(pathname) | 138 | fs.delete(pathname) |
139 | fs.delete(pathname..".timestamp") | 139 | fs.delete(pathname..".timestamp") |
140 | return nil, "Failed extracting manifest file" | 140 | return nil, "Failed extracting manifest file: " .. err |
141 | end | 141 | end |
142 | pathname = nozip | 142 | pathname = nozip |
143 | end | 143 | end |