Compare commits

...

2 Commits

Author SHA1 Message Date
Daz DeBoer
cd579d970f Build outputs 2022-08-18 17:19:11 -06:00
Daz DeBoer
f0ec7fb780 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
2022-08-18 17:10:03 -06:00
5 changed files with 8 additions and 14 deletions

6
dist/main/index.js vendored
View File

@@ -65941,8 +65941,7 @@ class AbstractEntryExtractor {
const artifactType = cacheEntryDefinition.artifactType;
const pattern = cacheEntryDefinition.pattern;
const globber = yield glob.create(pattern, {
implicitDescendants: false,
followSymbolicLinks: false
implicitDescendants: false
});
const matchingFiles = yield globber.glob();
if (matchingFiles.length === 0) {
@@ -66045,8 +66044,7 @@ class GradleHomeEntryExtractor extends AbstractEntryExtractor {
return __awaiter(this, void 0, void 0, function* () {
const wrapperZips = path_1.default.resolve(this.gradleUserHome, 'wrapper/dists/*/*/*.zip');
const globber = yield glob.create(wrapperZips, {
implicitDescendants: false,
followSymbolicLinks: false
implicitDescendants: false
});
for (const wrapperZip of yield globber.glob()) {
(0, cache_utils_1.cacheDebug)(`Deleting wrapper zip: ${wrapperZip}`);

File diff suppressed because one or more lines are too long

6
dist/post/index.js vendored
View File

@@ -64992,8 +64992,7 @@ class AbstractEntryExtractor {
const artifactType = cacheEntryDefinition.artifactType;
const pattern = cacheEntryDefinition.pattern;
const globber = yield glob.create(pattern, {
implicitDescendants: false,
followSymbolicLinks: false
implicitDescendants: false
});
const matchingFiles = yield globber.glob();
if (matchingFiles.length === 0) {
@@ -65096,8 +65095,7 @@ class GradleHomeEntryExtractor extends AbstractEntryExtractor {
return __awaiter(this, void 0, void 0, function* () {
const wrapperZips = path_1.default.resolve(this.gradleUserHome, 'wrapper/dists/*/*/*.zip');
const globber = yield glob.create(wrapperZips, {
implicitDescendants: false,
followSymbolicLinks: false
implicitDescendants: false
});
for (const wrapperZip of yield globber.glob()) {
(0, cache_utils_1.cacheDebug)(`Deleting wrapper zip: ${wrapperZip}`);

File diff suppressed because one or more lines are too long

View File

@@ -150,8 +150,7 @@ abstract class AbstractEntryExtractor {
// Find all matching files for this cache entry definition
const globber = await glob.create(pattern, {
implicitDescendants: false,
followSymbolicLinks: false
implicitDescendants: false
})
const matchingFiles = await globber.glob()
@@ -308,8 +307,7 @@ export class GradleHomeEntryExtractor extends AbstractEntryExtractor {
private async deleteWrapperZips(): Promise<void> {
const wrapperZips = path.resolve(this.gradleUserHome, 'wrapper/dists/*/*/*.zip')
const globber = await glob.create(wrapperZips, {
implicitDescendants: false,
followSymbolicLinks: false
implicitDescendants: false
})
for (const wrapperZip of await globber.glob()) {