From 71ec744d4629a09bb9d5b13222f13744850af363 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Thu, 6 Aug 2020 00:17:23 +0900 Subject: [PATCH] Use posix archive format (#533) * Use posix archive format Signed-off-by: Sora Morimoto * Update package.json and RELEASES.md Signed-off-by: Sora Morimoto --- RELEASES.md | 5 ++++- __tests__/tar.test.ts | 2 ++ package-lock.json | 2 +- package.json | 2 +- src/internal/tar.ts | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index dce5009..5136919 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -17,4 +17,7 @@ - `retry`, `retryTypedResponse`, and `retryHttpClientResponse` moved from `cacheHttpClient` to `requestUtils` ### 1.0.1 -- Fix bug in downloading large files (> 2 GBs) with the Azure SDK \ No newline at end of file +- Fix bug in downloading large files (> 2 GBs) with the Azure SDK + +### 1.0.2 +- Use posix archive format to add support for some tools diff --git a/__tests__/tar.test.ts b/__tests__/tar.test.ts index ecb6799..b891d85 100644 --- a/__tests__/tar.test.ts +++ b/__tests__/tar.test.ts @@ -135,6 +135,7 @@ test('zstd create tar', async () => { expect(execMock).toHaveBeenCalledWith( `"${tarPath}"`, [ + '--posix', '--use-compress-program', 'zstd -T0 --long=30', '-cf', @@ -170,6 +171,7 @@ test('gzip create tar', async () => { expect(execMock).toHaveBeenCalledWith( `"${tarPath}"`, [ + '--posix', '-z', '-cf', IS_WINDOWS ? CacheFilename.Gzip.replace(/\\/g, '/') : CacheFilename.Gzip, diff --git a/package-lock.json b/package-lock.json index 647bfc9..2755a27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@actions/cache", - "version": "1.0.0", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c41de86..52c8c3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@actions/cache", - "version": "1.0.1", + "version": "1.0.2", "preview": true, "description": "Actions cache lib", "keywords": [ diff --git a/src/internal/tar.ts b/src/internal/tar.ts index 7f836b8..680433e 100644 --- a/src/internal/tar.ts +++ b/src/internal/tar.ts @@ -101,6 +101,7 @@ export async function createTar( } } const args = [ + '--posix', ...getCompressionProgram(), '-cf', cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),