mirror of https://github.com/actions/toolkit
Address review comments
parent
59285b8b01
commit
8e239763e5
|
@ -77,12 +77,17 @@ export function getCacheVersion(
|
||||||
enableCrossOsArchive = false
|
enableCrossOsArchive = false
|
||||||
): string {
|
): string {
|
||||||
const components = paths
|
const components = paths
|
||||||
.concat(!compressionMethod ? [] : [compressionMethod])
|
|
||||||
.concat(
|
// Add compression method to cache version to restore
|
||||||
process.platform !== 'win32' || enableCrossOsArchive
|
// compressed cache as per compression method
|
||||||
? []
|
if (compressionMethod) {
|
||||||
: ['windows-only']
|
components.push(compressionMethod)
|
||||||
) // Only check for windows platforms if enableCrossOsArchive is false
|
}
|
||||||
|
|
||||||
|
// 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
|
// Add salt to cache version to support breaking changes in cache entry
|
||||||
components.push(versionSalt)
|
components.push(versionSalt)
|
||||||
|
|
Loading…
Reference in New Issue