From 15cc910c907603bee5fde998d198f60a23291c7e Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Tue, 23 Jul 2024 22:55:11 +0900 Subject: [PATCH] _ Signed-off-by: Sora Morimoto --- packages/cache/__tests__/tar.test.ts | 8 ++++---- packages/cache/src/internal/tar.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/cache/__tests__/tar.test.ts b/packages/cache/__tests__/tar.test.ts index 7c7f50e059..1e40f2b3ee 100644 --- a/packages/cache/__tests__/tar.test.ts +++ b/packages/cache/__tests__/tar.test.ts @@ -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, { @@ -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 { @@ -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, { @@ -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, { diff --git a/packages/cache/src/internal/tar.ts b/packages/cache/src/internal/tar.ts index defacb0218..c3b9de45ee 100644 --- a/packages/cache/src/internal/tar.ts +++ b/packages/cache/src/internal/tar.ts @@ -186,7 +186,7 @@ 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 ? [ @@ -194,7 +194,7 @@ async function getDecompressionProgram( TarFilename, archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/') ] - : ['--use-compress-program', 'zstd -d'] + : ['--use-compress-program', '"zstd -d"'] default: return ['-z'] } @@ -223,7 +223,7 @@ 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 ? [ @@ -231,7 +231,7 @@ async function getCompressionProgram( 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 ? [ @@ -239,7 +239,7 @@ async function getCompressionProgram( cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), TarFilename ] - : ['--use-compress-program', 'zstd -T0'] + : ['--use-compress-program', '"zstd -T0"'] default: return ['-z'] }