1
0
Fork 0
pull/1260/head
Sampark Sharma 2022-12-12 07:25:36 +00:00 committed by GitHub
parent bbf5659dfa
commit 6bc5dc5a23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -365,7 +365,7 @@ test('zstd list tar with windows BSDtar', async () => {
await tar.listTar(archivePath, CompressionMethod.Zstd)
const tarPath = SystemTarPathOnWindows
expect(execMock).toHaveBeenCalledTimes(1)
expect(execMock).toHaveBeenCalledTimes(2)
expect(execMock).toHaveBeenNthCalledWith(
1,

View File

@ -180,7 +180,7 @@ async function getDecompressionProgram(
case CompressionMethod.Zstd:
return BSD_TAR_ZSTD
? [
'zstd -d --long=30 -o',
'zstd -d --long=30 --force -o',
TarFilename,
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
]
@ -191,7 +191,7 @@ async function getDecompressionProgram(
case CompressionMethod.ZstdWithoutLong:
return BSD_TAR_ZSTD
? [
'zstd -d -o',
'zstd -d --force -o',
TarFilename,
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
]
@ -219,7 +219,7 @@ async function getCompressionProgram(
case CompressionMethod.Zstd:
return BSD_TAR_ZSTD
? [
'zstd -T0 --long=30 -o',
'zstd -T0 --long=30 --force -o',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
TarFilename
]
@ -230,7 +230,7 @@ async function getCompressionProgram(
case CompressionMethod.ZstdWithoutLong:
return BSD_TAR_ZSTD
? [
'zstd -T0 -o',
'zstd -T0 --force -o',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
TarFilename
]
@ -245,7 +245,9 @@ async function execCommands(commands: string[], cwd?: string): Promise<void> {
try {
await exec(command, undefined, {cwd})
} catch (error) {
throw new Error(`${command[0]} failed with error: ${error?.message}`)
throw new Error(
`${command.split(' ')[0]} failed with error: ${error?.message}`
)
}
}
}