mirror of https://github.com/actions/toolkit
Fix tests
parent
6b01e7a980
commit
13b027cad9
|
@ -4,7 +4,6 @@ import * as utils from './internal/cacheUtils'
|
|||
import * as cacheHttpClient from './internal/cacheHttpClient'
|
||||
import {createTar, extractTar, listTar} from './internal/tar'
|
||||
import {DownloadOptions, UploadOptions} from './options'
|
||||
import {CompressionMethod} from './internal/constants'
|
||||
import {ArtifactCacheEntry} from './internal/contracts'
|
||||
|
||||
export class ValidationError extends Error {
|
||||
|
@ -89,12 +88,11 @@ export async function restoreCache(
|
|||
checkKey(key)
|
||||
}
|
||||
|
||||
let cacheEntry: ArtifactCacheEntry | null
|
||||
let compressionMethod = await utils.getCompressionMethod()
|
||||
const compressionMethod = await utils.getCompressionMethod()
|
||||
let archivePath = ''
|
||||
try {
|
||||
// path are needed to compute version
|
||||
cacheEntry = await cacheHttpClient.getCacheEntry(keys, paths, {
|
||||
const cacheEntry = await cacheHttpClient.getCacheEntry(keys, paths, {
|
||||
compressionMethod,
|
||||
enableCrossOsArchive
|
||||
})
|
||||
|
|
|
@ -79,7 +79,9 @@ export function getCacheVersion(
|
|||
const components = paths
|
||||
.concat([!compressionMethod ? '' : compressionMethod])
|
||||
.concat(
|
||||
process.platform !== 'win32' || enableCrossOsArchive ? [] : ['windows-only']
|
||||
process.platform !== 'win32' || enableCrossOsArchive
|
||||
? []
|
||||
: ['windows-only']
|
||||
) // Only check for windows platforms if enableCrossOsArchive is false
|
||||
|
||||
// Add salt to cache version to support breaking changes in cache entry
|
||||
|
|
Loading…
Reference in New Issue