Skip to content

Commit 39e661c

Browse files
committed
Improve info messaging for cache restore asdf-vm#235
1 parent 0066de9 commit 39e661c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

install/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66943,7 +66943,13 @@ async function restoreAsdfCache() {
6694366943
cacheKeyPrefix
6694466944
];
6694566945
core3.debug(`Restoring ${paths.join(", ")} from cache with key "${cacheKey}" using restore keys "${restoreKeys.join(", ")}"`);
66946-
return cache.restoreCache(paths, cacheKey, restoreKeys);
66946+
const foundCacheKey = await cache.restoreCache(paths, cacheKey, restoreKeys);
66947+
if (foundCacheKey) {
66948+
core3.info(`Cache restored with key "${foundCacheKey}"`);
66949+
} else {
66950+
core3.info(`No cache found with key "${cacheKey}, "${restoreKeys.join(", ")}"`);
66951+
}
66952+
return foundCacheKey;
6694766953
}
6694866954

6694966955
// src/install/index.ts

src/caching/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ export async function restoreAsdfCache() {
4545
];
4646

4747
core.debug(`Restoring ${paths.join(', ')} from cache with key "${cacheKey}" using restore keys "${restoreKeys.join(', ')}"`);
48-
return cache.restoreCache(paths, cacheKey, restoreKeys);
48+
const foundCacheKey = await cache.restoreCache(paths, cacheKey, restoreKeys);
49+
if (foundCacheKey) {
50+
core.info(`Cache restored with key "${foundCacheKey}"`);
51+
} else {
52+
core.info(`No cache found with key "${cacheKey}, "${restoreKeys.join(', ')}"`);
53+
}
54+
55+
return foundCacheKey;
4956
}
5057

5158
export async function saveAsdfCache() {

0 commit comments

Comments
 (0)