mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 10:29:06 +08:00
Address review comments
This commit is contained in:
parent
e7e19845ca
commit
2d3c79e6fe
1
.github/workflows/cache-windows-test.yml
vendored
1
.github/workflows/cache-windows-test.yml
vendored
@ -78,6 +78,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
rm -rf test-cache
|
rm -rf test-cache
|
||||||
rm -rf ~/test-cache
|
rm -rf ~/test-cache
|
||||||
|
rm -f cache.tar
|
||||||
|
|
||||||
- name: Restore cache using restoreCache() with Azure SDK
|
- name: Restore cache using restoreCache() with Azure SDK
|
||||||
run: |
|
run: |
|
||||||
|
6
packages/cache/__tests__/tar.test.ts
vendored
6
packages/cache/__tests__/tar.test.ts
vendored
@ -99,7 +99,7 @@ test('zstd extract tar with windows BSDtar', async () => {
|
|||||||
expect(execMock).toHaveBeenNthCalledWith(
|
expect(execMock).toHaveBeenNthCalledWith(
|
||||||
1,
|
1,
|
||||||
[
|
[
|
||||||
'zstd -d --long=30 --force -o',
|
'zstd -d --long=30 -o',
|
||||||
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
||||||
].join(' '),
|
].join(' '),
|
||||||
@ -273,7 +273,7 @@ test('zstd create tar with windows BSDtar', async () => {
|
|||||||
expect(execMock).toHaveBeenNthCalledWith(
|
expect(execMock).toHaveBeenNthCalledWith(
|
||||||
2,
|
2,
|
||||||
[
|
[
|
||||||
'zstd -T0 --long=30 --force -o',
|
'zstd -T0 --long=30 -o',
|
||||||
CacheFilename.Zstd.replace(/\\/g, '/'),
|
CacheFilename.Zstd.replace(/\\/g, '/'),
|
||||||
TarFilename.replace(/\\/g, '/')
|
TarFilename.replace(/\\/g, '/')
|
||||||
].join(' '),
|
].join(' '),
|
||||||
@ -370,7 +370,7 @@ test('zstd list tar with windows BSDtar', async () => {
|
|||||||
expect(execMock).toHaveBeenNthCalledWith(
|
expect(execMock).toHaveBeenNthCalledWith(
|
||||||
1,
|
1,
|
||||||
[
|
[
|
||||||
'zstd -d --long=30 --force -o',
|
'zstd -d --long=30 -o',
|
||||||
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
||||||
].join(' '),
|
].join(' '),
|
||||||
|
8
packages/cache/src/internal/tar.ts
vendored
8
packages/cache/src/internal/tar.ts
vendored
@ -183,7 +183,7 @@ async function getDecompressionProgram(
|
|||||||
case CompressionMethod.Zstd:
|
case CompressionMethod.Zstd:
|
||||||
return BSD_TAR_ZSTD
|
return BSD_TAR_ZSTD
|
||||||
? [
|
? [
|
||||||
'zstd -d --long=30 --force -o',
|
'zstd -d --long=30 -o',
|
||||||
TarFilename,
|
TarFilename,
|
||||||
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
||||||
]
|
]
|
||||||
@ -194,7 +194,7 @@ async function getDecompressionProgram(
|
|||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
return BSD_TAR_ZSTD
|
return BSD_TAR_ZSTD
|
||||||
? [
|
? [
|
||||||
'zstd -d --force -o',
|
'zstd -d -o',
|
||||||
TarFilename,
|
TarFilename,
|
||||||
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
|
||||||
]
|
]
|
||||||
@ -223,7 +223,7 @@ async function getCompressionProgram(
|
|||||||
case CompressionMethod.Zstd:
|
case CompressionMethod.Zstd:
|
||||||
return BSD_TAR_ZSTD
|
return BSD_TAR_ZSTD
|
||||||
? [
|
? [
|
||||||
'zstd -T0 --long=30 --force -o',
|
'zstd -T0 --long=30 -o',
|
||||||
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
TarFilename
|
TarFilename
|
||||||
]
|
]
|
||||||
@ -234,7 +234,7 @@ async function getCompressionProgram(
|
|||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
return BSD_TAR_ZSTD
|
return BSD_TAR_ZSTD
|
||||||
? [
|
? [
|
||||||
'zstd -T0 --force -o',
|
'zstd -T0 -o',
|
||||||
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
TarFilename
|
TarFilename
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user