Don't follow symlinks when hashing cache files (#10)
Fixes performance regression in 2eb83dc753
This commit is contained in:
parent
1cc0c15a80
commit
c033bc050f
3 changed files with 13 additions and 3 deletions
7
post.js
7
post.js
|
|
@ -72,7 +72,12 @@ async function saveCache(cacheConfig) {
|
|||
try {
|
||||
core.startGroup(`Save cache for ${cacheConfig.name}`)
|
||||
const paths = cacheConfig.paths
|
||||
const hash = await glob.hashFiles(cacheConfig.files.join('\n'))
|
||||
const hash = await glob.hashFiles(
|
||||
cacheConfig.files.join('\n'),
|
||||
undefined,
|
||||
// We don't want to follow symlinks as it's extremely slow on macOS.
|
||||
{ followSymbolicLinks: false }
|
||||
)
|
||||
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
||||
console.log(`Attempting to save ${paths} cache to ${key}`)
|
||||
await cache.saveCache(paths, key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue