From a8adbe4b05e86ce271bcaa92a75627feb6e5900d Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 13 Dec 2019 15:32:00 -0500 Subject: [PATCH] Fix cacheEntry type --- src/restore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/restore.ts b/src/restore.ts index 15570cd..6c09f85 100644 --- a/src/restore.ts +++ b/src/restore.ts @@ -61,7 +61,7 @@ async function run(): Promise { try { const cacheEntry = await cacheHttpClient.getCacheEntry(keys); - if (!cacheEntry) { + if (!cacheEntry || !cacheEntry?.archiveLocation) { core.info( `Cache not found for input keys: ${keys.join(", ")}.` ); @@ -78,7 +78,7 @@ async function run(): Promise { utils.setCacheState(cacheEntry); // Download the cache from the cache entry - await cacheHttpClient.downloadCache(cacheEntry, archivePath); + await cacheHttpClient.downloadCache(cacheEntry?.archiveLocation, archivePath); const archiveFileSize = utils.getArchiveFileSize(archivePath); core.info(