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/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);
|
||||
if (matchedKey) {
|
||||
saveState(additionalCacheMatchedKeyState(additionalCache.name), matchedKey);
|
||||
info(`Cache restored from key: ${matchedKey}`);
|
||||
}
|
||||
else {
|
||||
info(`${additionalCache.name} cache is not found`);
|
||||
info(`${additionalCache.name} cache restored from key: ${matchedKey}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -131118,10 +131115,10 @@ async function saveAdditionalCache(packageManager, additionalCache) {
|
||||
try {
|
||||
const cacheId = await cache.saveCache(additionalCache.path, primaryKey);
|
||||
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;
|
||||
}
|
||||
core.info(`Cache saved with the key: ${primaryKey}`);
|
||||
core.info(`${additionalCache.name} cache saved with the key: ${primaryKey}`);
|
||||
}
|
||||
catch (error) {
|
||||
const err = error;
|
||||
|
||||
Reference in New Issue
Block a user