mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-06 00:53:16 +08:00
Fix tests
This commit is contained in:
2
packages/cache/src/internal/cacheUtils.ts
vendored
2
packages/cache/src/internal/cacheUtils.ts
vendored
@@ -67,7 +67,7 @@ export async function unlinkFile(filePath: fs.PathLike): Promise<void> {
|
||||
return util.promisify(fs.unlink)(filePath)
|
||||
}
|
||||
|
||||
async function getVersion(app: string): Promise<string> {
|
||||
export async function getVersion(app: string): Promise<string> {
|
||||
core.debug(`Checking ${app} --version`)
|
||||
let versionOutput = ''
|
||||
try {
|
||||
|
||||
9
packages/cache/src/internal/tar.ts
vendored
9
packages/cache/src/internal/tar.ts
vendored
@@ -16,17 +16,18 @@ async function getTarPath(
|
||||
const systemTar = `${process.env['windir']}\\System32\\tar.exe`
|
||||
const gnuTar = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\tar.exe`
|
||||
if (existsSync(gnuTar)) {
|
||||
// Making GNUtar + zstd as default on windows
|
||||
// Use GNUtar as default on windows
|
||||
args.push('--force-local')
|
||||
return gnuTar
|
||||
} else if (compressionMethod !== CompressionMethod.Gzip) {
|
||||
} else if (
|
||||
compressionMethod !== CompressionMethod.Gzip ||
|
||||
(await utils.isGnuTarInstalled())
|
||||
) {
|
||||
// We only use zstandard compression on windows when gnu tar is installed due to
|
||||
// a bug with compressing large files with bsdtar + zstd
|
||||
args.push('--force-local')
|
||||
} else if (existsSync(systemTar)) {
|
||||
return systemTar
|
||||
} else if (await utils.isGnuTarInstalled()) {
|
||||
args.push('--force-local')
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user