Skip to content

Commit

Permalink
Add gnuTar as default in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantsure authored Nov 7, 2022
1 parent b36e704 commit 9366237
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/cache/src/internal/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ async function getTarPath(
switch (process.platform) {
case 'win32': {
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
// a bug with compressing large files with bsdtar + zstd
args.push('--force-local')
Expand Down

0 comments on commit 9366237

Please sign in to comment.