1
0
Fork 0
mirror of https://github.com/rharkor/caching-for-turbo.git synced 2025-06-08 01:37:01 +09:00
This commit is contained in:
rharkor 2025-04-10 11:24:29 +02:00
parent e8a92e80c1
commit df1a0bc4e2

View file

@ -1,7 +1,6 @@
import { Readable } from 'node:stream'
import { env } from '../env'
import * as core from '@actions/core'
import * as cacheHttpClient from '@actions/cache/lib/internal/cacheHttpClient'
import * as cacheTwirpClient from '@actions/cache/lib/internal/shared/cacheTwirpClient'
import * as utils from '@actions/cache/lib/internal/cacheUtils'
import streamToPromise from 'stream-to-promise'
@ -93,7 +92,6 @@ export function getCacheClient() {
checkKey(key)
}
let archivePath = ''
try {
const twirpClient = cacheTwirpClient.internalCacheTwirpClient()
const compressionMethod = await utils.getCompressionMethod()
@ -128,14 +126,6 @@ export function getCacheClient() {
// Supress all non-validation cache related errors because caching should be optional
core.warning(`Failed to restore: ${(error as Error).message}`)
}
} finally {
try {
if (archivePath) {
await utils.unlinkFile(archivePath)
}
} catch (error) {
core.debug(`Failed to delete archive: ${error}`)
}
}
return { success: false, data: undefined }