mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 03:29:06 +08:00
Merge pull request #1135 from actions/pdotl-zstd-alias
Move zstd from flags to equivalent aliases
This commit is contained in:
commit
01e1ff7bc0
8
packages/cache/__tests__/tar.test.ts
vendored
8
packages/cache/__tests__/tar.test.ts
vendored
@ -50,7 +50,7 @@ test('zstd extract tar', async () => {
|
|||||||
`"${defaultTarPath}"`,
|
`"${defaultTarPath}"`,
|
||||||
[
|
[
|
||||||
'--use-compress-program',
|
'--use-compress-program',
|
||||||
'zstd -d --long=30',
|
'unzstd --long=30',
|
||||||
'-xf',
|
'-xf',
|
||||||
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
|
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
|
||||||
'-P',
|
'-P',
|
||||||
@ -140,7 +140,7 @@ test('zstd create tar', async () => {
|
|||||||
[
|
[
|
||||||
'--posix',
|
'--posix',
|
||||||
'--use-compress-program',
|
'--use-compress-program',
|
||||||
'zstd -T0 --long=30',
|
'zstdmt --long=30',
|
||||||
'-cf',
|
'-cf',
|
||||||
IS_WINDOWS ? CacheFilename.Zstd.replace(/\\/g, '/') : CacheFilename.Zstd,
|
IS_WINDOWS ? CacheFilename.Zstd.replace(/\\/g, '/') : CacheFilename.Zstd,
|
||||||
'--exclude',
|
'--exclude',
|
||||||
@ -210,7 +210,7 @@ test('zstd list tar', async () => {
|
|||||||
`"${defaultTarPath}"`,
|
`"${defaultTarPath}"`,
|
||||||
[
|
[
|
||||||
'--use-compress-program',
|
'--use-compress-program',
|
||||||
'zstd -d --long=30',
|
'unzstd --long=30',
|
||||||
'-tf',
|
'-tf',
|
||||||
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
|
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
|
||||||
'-P'
|
'-P'
|
||||||
@ -235,7 +235,7 @@ test('zstdWithoutLong list tar', async () => {
|
|||||||
`"${defaultTarPath}"`,
|
`"${defaultTarPath}"`,
|
||||||
[
|
[
|
||||||
'--use-compress-program',
|
'--use-compress-program',
|
||||||
'zstd -d',
|
'unzstd',
|
||||||
'-tf',
|
'-tf',
|
||||||
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
|
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
|
||||||
'-P'
|
'-P'
|
||||||
|
12
packages/cache/src/internal/tar.ts
vendored
12
packages/cache/src/internal/tar.ts
vendored
@ -67,9 +67,9 @@ export async function extractTar(
|
|||||||
function getCompressionProgram(): string[] {
|
function getCompressionProgram(): string[] {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case CompressionMethod.Zstd:
|
case CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -d --long=30']
|
return ['--use-compress-program', 'unzstd --long=30']
|
||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -d']
|
return ['--use-compress-program', 'unzstd']
|
||||||
default:
|
default:
|
||||||
return ['-z']
|
return ['-z']
|
||||||
}
|
}
|
||||||
@ -106,9 +106,9 @@ export async function createTar(
|
|||||||
function getCompressionProgram(): string[] {
|
function getCompressionProgram(): string[] {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case CompressionMethod.Zstd:
|
case CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -T0 --long=30']
|
return ['--use-compress-program', 'zstdmt --long=30']
|
||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -T0']
|
return ['--use-compress-program', 'zstdmt']
|
||||||
default:
|
default:
|
||||||
return ['-z']
|
return ['-z']
|
||||||
}
|
}
|
||||||
@ -140,9 +140,9 @@ export async function listTar(
|
|||||||
function getCompressionProgram(): string[] {
|
function getCompressionProgram(): string[] {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case CompressionMethod.Zstd:
|
case CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -d --long=30']
|
return ['--use-compress-program', 'unzstd --long=30']
|
||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -d']
|
return ['--use-compress-program', 'unzstd']
|
||||||
default:
|
default:
|
||||||
return ['-z']
|
return ['-z']
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user