aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/fs/unix/tools.lua12
-rwxr-xr-xtest/testing.sh4
2 files changed, 11 insertions, 5 deletions
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua
index 442004ce..767bae4d 100644
--- a/src/luarocks/fs/unix/tools.lua
+++ b/src/luarocks/fs/unix/tools.lua
@@ -293,13 +293,19 @@ end
293function tools.unpack_archive(archive) 293function tools.unpack_archive(archive)
294 assert(type(archive) == "string") 294 assert(type(archive) == "string")
295 295
296 local pipe_to_tar = " | "..vars.TAR.." -xf -"
297
298 if not cfg.verbose then
299 pipe_to_tar = " 2> /dev/null"..fs.quiet(pipe_to_tar)
300 end
301
296 local ok 302 local ok
297 if archive:match("%.tar%.gz$") or archive:match("%.tgz$") then 303 if archive:match("%.tar%.gz$") or archive:match("%.tgz$") then
298 ok = fs.execute_string(vars.GUNZIP.." -c "..archive.."|"..vars.TAR.." -xf -") 304 ok = fs.execute_string(vars.GUNZIP.." -c "..fs.Q(archive)..pipe_to_tar)
299 elseif archive:match("%.tar%.bz2$") then 305 elseif archive:match("%.tar%.bz2$") then
300 ok = fs.execute_string(vars.BUNZIP2.." -c "..archive.."|tar -xf -") 306 ok = fs.execute_string(vars.BUNZIP2.." -c "..fs.Q(archive)..pipe_to_tar)
301 elseif archive:match("%.zip$") then 307 elseif archive:match("%.zip$") then
302 ok = fs.execute(vars.UNZIP, archive) 308 ok = fs.execute_quiet(vars.UNZIP, archive)
303 elseif archive:match("%.lua$") or archive:match("%.c$") then 309 elseif archive:match("%.lua$") or archive:match("%.c$") then
304 -- Ignore .lua and .c files; they don't need to be extracted. 310 -- Ignore .lua and .c files; they don't need to be extracted.
305 return true 311 return true
diff --git a/test/testing.sh b/test/testing.sh
index 106f31cd..f3b917c0 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -179,7 +179,7 @@ srcdir_luasocket=luasocket-3.0-rc1
179version_cprint=0.1 179version_cprint=0.1
180verrev_cprint=0.1-2 180verrev_cprint=0.1-2
181 181
182version_luacov=0.9.1 182version_luacov=0.11.0
183verrev_luacov=${version_luacov}-1 183verrev_luacov=${version_luacov}-1
184version_lxsh=0.8.6 184version_lxsh=0.8.6
185version_validate_args=1.5.4 185version_validate_args=1.5.4
@@ -237,7 +237,7 @@ mkdir -p "$testing_server"
237 get "$luarocks_repo/stdlib-41.0.0-1.src.rock" 237 get "$luarocks_repo/stdlib-41.0.0-1.src.rock"
238 get "$luarocks_repo/luarepl-0.4-1.src.rock" 238 get "$luarocks_repo/luarepl-0.4-1.src.rock"
239 get "$luarocks_repo/validate-args-1.5.4-1.rockspec" 239 get "$luarocks_repo/validate-args-1.5.4-1.rockspec"
240 get "$luarocks_repo/luasec-0.5-2.rockspec" 240 get "$luarocks_repo/luasec-0.6-1.rockspec"
241 get "$luarocks_repo/luabitop-1.0.2-1.rockspec" 241 get "$luarocks_repo/luabitop-1.0.2-1.rockspec"
242 get "$luarocks_repo/luabitop-1.0.2-1.src.rock" 242 get "$luarocks_repo/luabitop-1.0.2-1.src.rock"
243 get "$luarocks_repo/lpty-1.0.1-1.src.rock" 243 get "$luarocks_repo/lpty-1.0.1-1.src.rock"