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:
Bruno Borges
2026-07-09 21:16:37 -04:00
parent 7b72cee2af
commit 90f45856e1
3 changed files with 10 additions and 13 deletions

View File

@@ -99825,10 +99825,7 @@ async function restoreAdditionalCache(additionalCache) {
const matchedKey = await cache.restoreCache(additionalCache.path, primaryKey);
if (matchedKey) {
core.saveState(additionalCacheMatchedKeyState(additionalCache.name), matchedKey);
core.info(`Cache restored from key: ${matchedKey}`);
}
else {
core.info(`${additionalCache.name} cache is not found`);
core.info(`${additionalCache.name} cache restored from key: ${matchedKey}`);
}
}
/**
@@ -99896,10 +99893,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;
}
info(`Cache saved with the key: ${primaryKey}`);
info(`${additionalCache.name} cache saved with the key: ${primaryKey}`);
}
catch (error) {
const err = error;

9
dist/setup/index.js vendored
View File

@@ -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;