|
39 | 39 | -- extract archivefile using tar
|
40 | 40 | function _extract_using_tar(archivefile, outputdir, extension, opt)
|
41 | 41 |
|
42 |
| - -- the tar of windows can only extract "*.tar" |
43 |
| - if os.host() == "windows" and extension ~= ".tar" then |
| 42 | + -- the tar on windows can only extract "*.tar", "*.tar.gz" |
| 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 | 45 | return false
|
45 | 46 | end
|
46 | 47 |
|
@@ -425,7 +426,8 @@ function main(archivefile, outputdir, opt)
|
425 | 426 | , [".tgz"] = {_extract_using_7z, _extract_using_tar}
|
426 | 427 | , [".bz2"] = {_extract_using_7z, _extract_using_bzip2}
|
427 | 428 | , [".tar"] = {_extract_using_7z, _extract_using_tar}
|
428 |
| - , [".tar.gz"] = {_extract_using_7z, _extract_using_gzip} |
| 429 | + -- @see https://github.com/xmake-io/xmake/issues/5538 |
| 430 | + , [".tar.gz"] = {_extract_using_tar, _extract_using_7z, _extract_using_gzip} |
429 | 431 | , [".tar.xz"] = {_extract_using_7z, _extract_using_xz}
|
430 | 432 | , [".tar.bz2"] = {_extract_using_7z, _extract_using_bzip2}
|
431 | 433 | , [".tar.lz"] = {_extract_using_7z}
|
|
0 commit comments