Fix tests

This commit is contained in:
Sampark Sharma
2022-11-08 08:47:35 +00:00
committed by GitHub
parent e0aadb573c
commit 436cf8d6ea
3 changed files with 39 additions and 15 deletions

View File

@@ -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 {

View File

@@ -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
}