Revert Address review comments

This commit is contained in:
Sampark Sharma
2022-12-07 08:41:56 +00:00
committed by GitHub
parent d79a09bc0e
commit 27f9a7d461
2 changed files with 16 additions and 32 deletions
+16 -6
View File
@@ -97,12 +97,22 @@ export async function restoreCache(
compressionMethod
})
} catch (error) {
cacheEntry = await cacheHttpClient.getCacheEntryForGzipFallbackOnWindows(
keys,
paths,
compressionMethod,
error
)
// This is to support the old cache entry created
// by the old version of the cache action on windows.
if (
process.platform === 'win32' &&
compressionMethod !== CompressionMethod.Gzip
) {
compressionMethod = CompressionMethod.Gzip
cacheEntry = await cacheHttpClient.getCacheEntry(keys, paths, {
compressionMethod
})
if (!cacheEntry?.archiveLocation) {
throw error
}
} else {
throw error
}
}
if (!cacheEntry?.archiveLocation) {