mirror of
https://github.com/actions/setup-java.git
synced 2026-07-30 21:26:19 +00:00
Skip optional Maven and Gradle wrapper cache saves when their distribution paths do not exist, while allowing the main dependency cache to save. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c0b19ff2-ef52-4ac1-a832-0f8f72c43219
This commit is contained in:
Vendored
+8
@@ -50898,6 +50898,14 @@ function saveAdditionalCache(packageManager, additionalCache) {
|
||||
core.info(`Cache hit occurred on the ${additionalCache.name} primary key ${primaryKey}, not saving cache.`);
|
||||
return;
|
||||
}
|
||||
const globber = yield glob.create(additionalCache.path.join('\n'), {
|
||||
implicitDescendants: false
|
||||
});
|
||||
const cachePaths = yield globber.glob();
|
||||
if (cachePaths.length === 0) {
|
||||
core.debug(`${additionalCache.name} cache paths do not exist, not saving cache.`);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const cacheId = yield cache.saveCache(additionalCache.path, primaryKey);
|
||||
if (cacheId === -1) {
|
||||
|
||||
Reference in New Issue
Block a user