1
0
Fork 0

Fix tar operations

bishal-change
Lovepreet Singh 2022-11-16 20:50:04 +00:00
parent db3517fe3b
commit 27bf8304ea
1 changed files with 3 additions and 6 deletions

View File

@ -64,9 +64,7 @@ async function getCompressionProgram(compressionMethod: CompressionMethod): Prom
switch (compressionMethod) {
case CompressionMethod.Zstd:
if (BSD_TAR_ZSTD) {
return [
'-O', '|','zstd -d --long=30 -o'
]
return ['-a'] // auto-detect compression
}
return [
'--use-compress-program',
@ -74,9 +72,7 @@ async function getCompressionProgram(compressionMethod: CompressionMethod): Prom
]
case CompressionMethod.ZstdWithoutLong:
if (BSD_TAR_ZSTD) {
return [
'-O', '|', 'zstd -d --long=30 -o'
]
return ['a'] // auto-detect compression
}
return ['--use-compress-program', IS_WINDOWS ? 'zstd -d' : 'unzstd']
default:
@ -168,6 +164,7 @@ export async function createTar(
workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
'--files-from',
manifestFilename,
'-cf',
...(await getCompressionProgram()),
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),