diff options
-rw-r--r-- | src/luarocks/fs/unix/tools.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index e26595d0..33dbc489 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua | |||
@@ -291,21 +291,21 @@ function get_md5(file, md5sum) | |||
291 | local computed | 291 | local computed |
292 | if cfg.md5checker == "md5sum" then | 292 | if cfg.md5checker == "md5sum" then |
293 | local pipe = io.popen("md5sum "..file) | 293 | local pipe = io.popen("md5sum "..file) |
294 | computed = pipe:read("*l") | 294 | computed = pipe:read("*a") |
295 | pipe:close() | 295 | pipe:close() |
296 | if computed then | 296 | if computed then |
297 | computed = computed:gsub("[^%x]+", ""):sub(1,32) | 297 | computed = computed:gsub("[^%x]+", ""):sub(1,32) |
298 | end | 298 | end |
299 | elseif cfg.md5checker == "openssl" then | 299 | elseif cfg.md5checker == "openssl" then |
300 | local pipe = io.popen("openssl md5 "..file) | 300 | local pipe = io.popen("openssl md5 "..file) |
301 | computed = pipe:read("*l") | 301 | computed = pipe:read("*a") |
302 | pipe:close() | 302 | pipe:close() |
303 | if computed then | 303 | if computed then |
304 | computed = computed:sub(-32) | 304 | computed = computed:sub(-32) |
305 | end | 305 | end |
306 | elseif cfg.md5checker == "md5" then | 306 | elseif cfg.md5checker == "md5" then |
307 | local pipe = io.popen("md5 "..file) | 307 | local pipe = io.popen("md5 "..file) |
308 | computed = pipe:read("*l") | 308 | computed = pipe:read("*a") |
309 | pipe:close() | 309 | pipe:close() |
310 | if computed then | 310 | if computed then |
311 | computed = computed:sub(-32) | 311 | computed = computed:sub(-32) |