Skip to content

Commit

Permalink
Fix GNUtar path
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantsure authored Nov 8, 2022
1 parent 62a66a8 commit e0aadb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cache/src/internal/cacheUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function getCacheFileName(compressionMethod: CompressionMethod): string {
}

export async function isGnuTarInstalled(): Promise<boolean> {
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)
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/src/internal/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e0aadb5

Please sign in to comment.