1
0
Fork 0

Merge pull request #1135 from actions/pdotl-zstd-alias

Move zstd from flags to equivalent aliases
pull/1138/head
Lovepreet Singh 2022-07-26 16:04:16 +05:30 committed by GitHub
commit 01e1ff7bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -50,7 +50,7 @@ test('zstd extract tar', async () => {
`"${defaultTarPath}"`,
[
'--use-compress-program',
'zstd -d --long=30',
'unzstd --long=30',
'-xf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P',
@ -140,7 +140,7 @@ test('zstd create tar', async () => {
[
'--posix',
'--use-compress-program',
'zstd -T0 --long=30',
'zstdmt --long=30',
'-cf',
IS_WINDOWS ? CacheFilename.Zstd.replace(/\\/g, '/') : CacheFilename.Zstd,
'--exclude',
@ -210,7 +210,7 @@ test('zstd list tar', async () => {
`"${defaultTarPath}"`,
[
'--use-compress-program',
'zstd -d --long=30',
'unzstd --long=30',
'-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P'
@ -235,7 +235,7 @@ test('zstdWithoutLong list tar', async () => {
`"${defaultTarPath}"`,
[
'--use-compress-program',
'zstd -d',
'unzstd',
'-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P'

View File

@ -67,9 +67,9 @@ export async function extractTar(
function getCompressionProgram(): string[] {
switch (compressionMethod) {
case CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -d --long=30']
return ['--use-compress-program', 'unzstd --long=30']
case CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -d']
return ['--use-compress-program', 'unzstd']
default:
return ['-z']
}
@ -106,9 +106,9 @@ export async function createTar(
function getCompressionProgram(): string[] {
switch (compressionMethod) {
case CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -T0 --long=30']
return ['--use-compress-program', 'zstdmt --long=30']
case CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -T0']
return ['--use-compress-program', 'zstdmt']
default:
return ['-z']
}
@ -140,9 +140,9 @@ export async function listTar(
function getCompressionProgram(): string[] {
switch (compressionMethod) {
case CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -d --long=30']
return ['--use-compress-program', 'unzstd --long=30']
case CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -d']
return ['--use-compress-program', 'unzstd']
default:
return ['-z']
}