1
0
Fork 0

Address review comments

pull/1291/head
Sampark Sharma 2023-01-03 11:46:51 +00:00 committed by GitHub
parent 59285b8b01
commit 8e239763e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 6 deletions

View File

@ -77,12 +77,17 @@ export function getCacheVersion(
enableCrossOsArchive = false
): string {
const components = paths
.concat(!compressionMethod ? [] : [compressionMethod])
.concat(
process.platform !== 'win32' || enableCrossOsArchive
? []
: ['windows-only']
) // Only check for windows platforms if enableCrossOsArchive is false
// Add compression method to cache version to restore
// compressed cache as per compression method
if (compressionMethod) {
components.push(compressionMethod)
}
// Only check for windows platforms if enableCrossOsArchive is false
if (process.platform === 'win32' && !enableCrossOsArchive) {
components.push('windows-only')
}
// Add salt to cache version to support breaking changes in cache entry
components.push(versionSalt)