mirror of
https://gitea.com/actions/setup-java.git
synced 2026-07-11 19:41:57 +08:00
Fix broken try/catch in saveAdditionalCache and rebuild dist
The autofix commits dropped the `} catch (error) {` line in
saveAdditionalCache, leaving a `try` block without a catch and a dangling
`error` reference, which broke compilation and Prettier. Restore the catch
clause, reformat, and regenerate the dist bundles.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
9
dist/cleanup/index.js
vendored
9
dist/cleanup/index.js
vendored
@@ -99825,10 +99825,7 @@ async function restoreAdditionalCache(additionalCache) {
|
|||||||
const matchedKey = await cache.restoreCache(additionalCache.path, primaryKey);
|
const matchedKey = await cache.restoreCache(additionalCache.path, primaryKey);
|
||||||
if (matchedKey) {
|
if (matchedKey) {
|
||||||
core.saveState(additionalCacheMatchedKeyState(additionalCache.name), matchedKey);
|
core.saveState(additionalCacheMatchedKeyState(additionalCache.name), matchedKey);
|
||||||
core.info(`Cache restored from key: ${matchedKey}`);
|
core.info(`${additionalCache.name} cache restored from key: ${matchedKey}`);
|
||||||
}
|
|
||||||
else {
|
|
||||||
core.info(`${additionalCache.name} cache is not found`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -99896,10 +99893,10 @@ async function saveAdditionalCache(packageManager, additionalCache) {
|
|||||||
try {
|
try {
|
||||||
const cacheId = await cache_saveCache(additionalCache.path, primaryKey);
|
const cacheId = await cache_saveCache(additionalCache.path, primaryKey);
|
||||||
if (cacheId === -1) {
|
if (cacheId === -1) {
|
||||||
core_debug(`Cache was not saved for the key: ${primaryKey}`);
|
core_debug(`${additionalCache.name} cache was not saved for the key: ${primaryKey}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
info(`Cache saved with the key: ${primaryKey}`);
|
info(`${additionalCache.name} cache saved with the key: ${primaryKey}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
const err = error;
|
const err = error;
|
||||||
|
|||||||
9
dist/setup/index.js
vendored
9
dist/setup/index.js
vendored
@@ -131047,10 +131047,7 @@ async function restoreAdditionalCache(additionalCache) {
|
|||||||
const matchedKey = await restoreCache(additionalCache.path, primaryKey);
|
const matchedKey = await restoreCache(additionalCache.path, primaryKey);
|
||||||
if (matchedKey) {
|
if (matchedKey) {
|
||||||
saveState(additionalCacheMatchedKeyState(additionalCache.name), matchedKey);
|
saveState(additionalCacheMatchedKeyState(additionalCache.name), matchedKey);
|
||||||
info(`Cache restored from key: ${matchedKey}`);
|
info(`${additionalCache.name} cache restored from key: ${matchedKey}`);
|
||||||
}
|
|
||||||
else {
|
|
||||||
info(`${additionalCache.name} cache is not found`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -131118,10 +131115,10 @@ async function saveAdditionalCache(packageManager, additionalCache) {
|
|||||||
try {
|
try {
|
||||||
const cacheId = await cache.saveCache(additionalCache.path, primaryKey);
|
const cacheId = await cache.saveCache(additionalCache.path, primaryKey);
|
||||||
if (cacheId === -1) {
|
if (cacheId === -1) {
|
||||||
core.debug(`Cache was not saved for the key: ${primaryKey}`);
|
core.debug(`${additionalCache.name} cache was not saved for the key: ${primaryKey}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Cache saved with the key: ${primaryKey}`);
|
core.info(`${additionalCache.name} cache saved with the key: ${primaryKey}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
const err = error;
|
const err = error;
|
||||||
|
|||||||
@@ -327,7 +327,10 @@ async function saveAdditionalCache(
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`${additionalCache.name} cache saved with the key: ${primaryKey}`);
|
core.info(
|
||||||
|
`${additionalCache.name} cache saved with the key: ${primaryKey}`
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
const err = error as Error;
|
const err = error as Error;
|
||||||
|
|
||||||
if (err.name === cache.ReserveCacheError.name) {
|
if (err.name === cache.ReserveCacheError.name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user