1
0
Fork 0

Fix GNUtar path

pull/1232/head
Sampark Sharma 2022-11-08 08:29:31 +00:00 committed by GitHub
parent 62a66a8ce9
commit e0aadb573c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ export function getCacheFileName(compressionMethod: CompressionMethod): string {
} }
export async function isGnuTarInstalled(): Promise<boolean> { 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') const versionOutput = await getVersion('tar')
return ( return (
versionOutput.toLowerCase().includes('gnu tar') || fs.existsSync(gnuTar) versionOutput.toLowerCase().includes('gnu tar') || fs.existsSync(gnuTar)

View File

@ -14,7 +14,7 @@ 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`
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)) { if (existsSync(gnuTar)) {
// Making GNUtar + zstd as default on windows // Making GNUtar + zstd as default on windows
args.push('--force-local') args.push('--force-local')