mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-29 19:51:04 -05:00
Remove 'followSymbolicLinks: false' flag for Globber
It appears that when restoring the Gradle User Home directory, certain empty directories are being identified by Node as broken symlinks. This results in `Error: ENOENT: No such file or directory` when attempting to resolve a Glob pattern. By using the default behaviour of Globber (followSymbolicLinks && ignoreBrokenLinks), these bad files no longer cause errors when saving the Gradle User Home to cache. Fixes #408
This commit is contained in:
parent
bf2a15ee94
commit
f0ec7fb780
1 changed files with 2 additions and 4 deletions
|
@ -150,8 +150,7 @@ abstract class AbstractEntryExtractor {
|
||||||
|
|
||||||
// Find all matching files for this cache entry definition
|
// Find all matching files for this cache entry definition
|
||||||
const globber = await glob.create(pattern, {
|
const globber = await glob.create(pattern, {
|
||||||
implicitDescendants: false,
|
implicitDescendants: false
|
||||||
followSymbolicLinks: false
|
|
||||||
})
|
})
|
||||||
const matchingFiles = await globber.glob()
|
const matchingFiles = await globber.glob()
|
||||||
|
|
||||||
|
@ -308,8 +307,7 @@ export class GradleHomeEntryExtractor extends AbstractEntryExtractor {
|
||||||
private async deleteWrapperZips(): Promise<void> {
|
private async deleteWrapperZips(): Promise<void> {
|
||||||
const wrapperZips = path.resolve(this.gradleUserHome, 'wrapper/dists/*/*/*.zip')
|
const wrapperZips = path.resolve(this.gradleUserHome, 'wrapper/dists/*/*/*.zip')
|
||||||
const globber = await glob.create(wrapperZips, {
|
const globber = await glob.create(wrapperZips, {
|
||||||
implicitDescendants: false,
|
implicitDescendants: false
|
||||||
followSymbolicLinks: false
|
|
||||||
})
|
})
|
||||||
|
|
||||||
for (const wrapperZip of await globber.glob()) {
|
for (const wrapperZip of await globber.glob()) {
|
||||||
|
|
Loading…
Reference in a new issue