Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <sora@morimoto.io>
  • Loading branch information
smorimoto committed Jul 23, 2024
1 parent 64ed6af commit 15cc910
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/cache/__tests__/tar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test('zstd extract tar', async () => {
]
.concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : [])
.concat(['--use-compress-program', 'zstd -d --long=30'])
.concat(['--use-compress-program', '"zstd -d --long=30"'])
.join(' '),
undefined,
{
Expand Down Expand Up @@ -228,7 +228,7 @@ test('zstd create tar', async () => {
]
.concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : [])
.concat(['--use-compress-program', 'zstd -T0 --adapt --long=30'])
.concat(['--use-compress-program', '"zstd -T0 --adapt --long=30"'])
.join(' '),
undefined, // args
{
Expand Down Expand Up @@ -359,7 +359,7 @@ test('zstd list tar', async () => {
]
.concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : [])
.concat(['--use-compress-program', 'zstd -d --long=30'])
.concat(['--use-compress-program', '"zstd -d --long=30"'])
.join(' '),
undefined,
{
Expand Down Expand Up @@ -433,7 +433,7 @@ test('zstdWithoutLong list tar', async () => {
]
.concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : [])
.concat(['--use-compress-program', 'zstd -d'])
.concat(['--use-compress-program', '"zstd -d"'])
.join(' '),
undefined,
{
Expand Down
10 changes: 5 additions & 5 deletions packages/cache/src/internal/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ async function getDecompressionProgram(
TarFilename,
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
]
: ['--use-compress-program', 'zstd -d --long=30']
: ['--use-compress-program', '"zstd -d --long=30"']
case CompressionMethod.ZstdWithoutLong:
return BSD_TAR_ZSTD
? [
'zstd -d --force -o',
TarFilename,
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
]
: ['--use-compress-program', 'zstd -d']
: ['--use-compress-program', '"zstd -d"']
default:
return ['-z']
}
Expand Down Expand Up @@ -223,23 +223,23 @@ async function getCompressionProgram(
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
TarFilename
]
: ['--use-compress-program', 'zstd -T0 --adapt --long=30']
: ['--use-compress-program', '"zstd -T0 --adapt --long=30"']
case CompressionMethod.ZstdWithoutAdapt:
return BSD_TAR_ZSTD
? [
'zstd -T0 --long=30 --force -o',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
TarFilename
]
: ['--use-compress-program', 'zstd -T0 --long=30']
: ['--use-compress-program', '"zstd -T0 --long=30"']
case CompressionMethod.ZstdWithoutLong:
return BSD_TAR_ZSTD
? [
'zstd -T0 --force -o',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
TarFilename
]
: ['--use-compress-program', 'zstd -T0']
: ['--use-compress-program', '"zstd -T0"']
default:
return ['-z']
}
Expand Down

0 comments on commit 15cc910

Please sign in to comment.