From fde1b0777855999d5ef04585d73a1a2046ce517d Mon Sep 17 00:00:00 2001 From: mpeterv Date: Thu, 14 Apr 2016 19:16:59 +0300 Subject: Quote archive name when unpacking Also use vars.TAR instead of literal "tar" when unpacking .tar.bz2 --- src/luarocks/fs/unix/tools.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index 442004ce..fed9c426 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua @@ -295,9 +295,9 @@ function tools.unpack_archive(archive) local ok if archive:match("%.tar%.gz$") or archive:match("%.tgz$") then - ok = fs.execute_string(vars.GUNZIP.." -c "..archive.."|"..vars.TAR.." -xf -") + ok = fs.execute_string(vars.GUNZIP.." -c "..fs.Q(archive).." | "..vars.TAR.." -xf -") elseif archive:match("%.tar%.bz2$") then - ok = fs.execute_string(vars.BUNZIP2.." -c "..archive.."|tar -xf -") + ok = fs.execute_string(vars.BUNZIP2.." -c "..fs.Q(archive).." | "..vars.TAR.." -xf -") elseif archive:match("%.zip$") then ok = fs.execute(vars.UNZIP, archive) elseif archive:match("%.lua$") or archive:match("%.c$") then -- cgit v1.2.3-55-g6feb