From e0aadb573c67b49e4b8d290385253c40d69b6582 Mon Sep 17 00:00:00 2001 From: Sampark Sharma Date: Tue, 8 Nov 2022 08:29:31 +0000 Subject: [PATCH] Fix GNUtar path --- packages/cache/src/internal/cacheUtils.ts | 2 +- packages/cache/src/internal/tar.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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')