1
0
Fork 0
mirror of https://github.com/actions/toolkit synced 2025-05-09 08:33:00 +00:00

Adding fix for tar exiting with code 1 issue

This commit is contained in:
Sankalp Kotewar 2022-06-01 13:18:50 +00:00 committed by GitHub
parent 8263c4d15d
commit 197f5a13a9
9 changed files with 1756 additions and 2017 deletions

View file

@ -64,4 +64,7 @@
- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
### 2.0.5
- Fix to avoid saving empty cache when no files are available for caching. ([issue](https://github.com/actions/cache/issues/624))
- Fix to avoid saving empty cache when no files are available for caching. ([issue](https://github.com/actions/cache/issues/624))
### 2.0.6
- Fix `Tar failed with error: The process '/usr/bin/tar' failed with exit code 1` issue when temp directory where tar is getting created is actually the subdirectory of the path mentioned by the user for caching. ([issue](https://github.com/actions/cache/issues/689))

View file

@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "2.0.5",
"version": "2.0.6",
"preview": true,
"description": "Actions cache lib",
"keywords": [

View file

@ -118,6 +118,8 @@ export async function createTar(
...getCompressionProgram(),
'-cf',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
'--exclude',
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
'-P',
'-C',
workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),