@@ -41,7 +41,7 @@ function _extract_using_tar(archivefile, outputdir, extension, opt)
41
41
42
42
-- the tar on windows can only extract "*.tar", "*.tar.gz"
43
43
-- the tar on msys2 can extract more, like "*.tar.bz2", ..
44
- if os .host () == " windows" and (extension ~= " .tar" or extension = = " .tar.gz" ) then
44
+ if os .host () == " windows" and (extension ~= " .tar" and extension ~ = " .tar.gz" ) then
45
45
return false
46
46
end
47
47
@@ -69,8 +69,12 @@ function _extract_using_tar(archivefile, outputdir, extension, opt)
69
69
table.insert (argv , " --force-local" )
70
70
end
71
71
end
72
- table.insert (argv , " -xf" )
73
- table.insert (argv , archivefile )
72
+ if option .get (" verbose" ) then
73
+ table.insert (argv , " -xvf" )
74
+ else
75
+ table.insert (argv , " -xf" )
76
+ end
77
+ table.insert (argv , path .absolute (archivefile ))
74
78
75
79
-- ensure output directory
76
80
if not os .isdir (outputdir ) then
@@ -97,6 +101,7 @@ function _extract_using_tar(archivefile, outputdir, extension, opt)
97
101
else
98
102
os .vrunv (program , argv )
99
103
end
104
+
100
105
return true
101
106
end
102
107
@@ -460,3 +465,4 @@ function main(archivefile, outputdir, opt)
460
465
-- extract it
461
466
return _extract (archivefile , outputdir , extension , extractors [extension ], opt )
462
467
end
468
+
0 commit comments