mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-01-03 15:12:56 +08:00
Add gnuTar as default in windows
This commit is contained in:
parent
b36e70495f
commit
9366237c90
6
packages/cache/src/internal/tar.ts
vendored
6
packages/cache/src/internal/tar.ts
vendored
@ -14,7 +14,11 @@ async function getTarPath(
|
|||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'win32': {
|
case 'win32': {
|
||||||
const systemTar = `${process.env['windir']}\\System32\\tar.exe`
|
const systemTar = `${process.env['windir']}\\System32\\tar.exe`
|
||||||
if (compressionMethod !== CompressionMethod.Gzip) {
|
const gnuTar = `${process.env['windir']}\\Program Files\\Git\\usr\\bin\\tar.exe`
|
||||||
|
if (compressionMethod !== CompressionMethod.Gzip && existsSync(gnuTar)) {
|
||||||
|
args.push('--force-local')
|
||||||
|
return gnuTar
|
||||||
|
} else if (compressionMethod !== CompressionMethod.Gzip) {
|
||||||
// We only use zstandard compression on windows when gnu tar is installed due to
|
// We only use zstandard compression on windows when gnu tar is installed due to
|
||||||
// a bug with compressing large files with bsdtar + zstd
|
// a bug with compressing large files with bsdtar + zstd
|
||||||
args.push('--force-local')
|
args.push('--force-local')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user