mirror of https://github.com/actions/toolkit
Fix GNUtar path
parent
62a66a8ce9
commit
e0aadb573c
|
@ -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)
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue