1
0
Fork 0

Fix windows cache path

pull/670/head
Aiqiao Yan 2020-12-10 10:59:04 -05:00
parent 8d11ee5a8c
commit 42b3ff04b2
4 changed files with 10 additions and 3 deletions

View File

@ -30,3 +30,6 @@
### 1.0.4
- Use @actions/core v1.2.6
- Fixes uploadChunk to throw an error if any unsuccessful response code is received
### 1.0.5
- Fix to ensure Windows cache paths get resolved correctly

4
packages/cache/package-lock.json generated vendored
View File

@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "1.0.4",
"version": "1.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -28,6 +28,8 @@
},
"@actions/http-client": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.9.tgz",
"integrity": "sha512-0O4SsJ7q+MK0ycvXPl2e6bMXV7dxAXOGjrXS1eTF9s2S401Tp6c/P3c3Joz04QefC1J6Gt942Wl2jbm3f4mLcg==",
"requires": {
"tunnel": "0.0.6"
},

View File

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

View File

@ -47,7 +47,9 @@ export async function resolvePaths(patterns: string[]): Promise<string[]> {
})
for await (const file of globber.globGenerator()) {
const relativeFile = path.relative(workspace, file)
const relativeFile = path
.relative(workspace, file)
.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
core.debug(`Matched: ${relativeFile}`)
// Paths are made relative so the tar entries are all relative to the root of the workspace.
paths.push(`${relativeFile}`)