diff --git a/packages/cache/src/internal/cacheUtils.ts b/packages/cache/src/internal/cacheUtils.ts index e6c09eec..da4b8d81 100644 --- a/packages/cache/src/internal/cacheUtils.ts +++ b/packages/cache/src/internal/cacheUtils.ts @@ -117,7 +117,7 @@ export function getCacheFileName(compressionMethod: CompressionMethod): string { } export async function isGnuTarInstalled(): Promise { - const gnuTar = `${process.env['windir']}\\Program Files\\Git\\usr\\bin\\tar.exe` + const gnuTar = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\tar.exe` const versionOutput = await getVersion('tar') return ( versionOutput.toLowerCase().includes('gnu tar') || fs.existsSync(gnuTar) diff --git a/packages/cache/src/internal/tar.ts b/packages/cache/src/internal/tar.ts index b650f4d0..9e140fe0 100644 --- a/packages/cache/src/internal/tar.ts +++ b/packages/cache/src/internal/tar.ts @@ -14,7 +14,7 @@ async function getTarPath( switch (process.platform) { case 'win32': { const systemTar = `${process.env['windir']}\\System32\\tar.exe` - const gnuTar = `${process.env['windir']}\\Program Files\\Git\\usr\\bin\\tar.exe` + const gnuTar = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\tar.exe` if (existsSync(gnuTar)) { // Making GNUtar + zstd as default on windows args.push('--force-local')