1
0
Fork 0

Merge pull request #1279 from actions/phantsure/bug-bash

Address bugbash issues
pull/1280/head
Sampark Sharma 2022-12-22 12:38:16 +05:30 committed by GitHub
commit c24b93f4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 9 deletions

View File

@ -78,7 +78,6 @@ 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: |

View File

@ -99,7 +99,7 @@ test('zstd extract tar with windows BSDtar', async () => {
expect(execMock).toHaveBeenNthCalledWith( expect(execMock).toHaveBeenNthCalledWith(
1, 1,
[ [
'zstd -d --long=30 -o', 'zstd -d --long=30 --force -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 -o', 'zstd -T0 --long=30 --force -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 -o', 'zstd -d --long=30 --force -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(' '),

View File

@ -109,7 +109,7 @@ export async function restoreCache(
return undefined return undefined
} }
core.debug( core.info(
"Couldn't find cache entry with zstd compression, falling back to gzip compression." "Couldn't find cache entry with zstd compression, falling back to gzip compression."
) )
} else { } else {

View File

@ -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 -o', 'zstd -d --long=30 --force -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 -o', 'zstd -d --force -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 -o', 'zstd -T0 --long=30 --force -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 -o', 'zstd -T0 --force -o',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
TarFilename TarFilename
] ]