This commit is contained in:
zoto_ff 2024-09-29 22:54:54 +03:00
parent a25a0f3a6e
commit a70f372af9
2 changed files with 4 additions and 8 deletions

View file

@ -74,10 +74,8 @@ export default async (options: Input): Promise<Output> => {
let revision: string | undefined;
let cacheHit = false;
if (cacheEnabled) {
const cacheKey = createHash('sha1')
.update(url)
.digest('base64');
const cacheKey = createHash("sha1").update(url).digest("base64");
const cacheRestored = await restoreCache([bunPath], cacheKey);
if (cacheRestored) {
revision = await getRevision(bunPath);

View file

@ -6,10 +6,8 @@ import { createHash } from "node:crypto";
(async () => {
const state: CacheState = JSON.parse(getState("cache"));
if (state.cacheEnabled && !state.cacheHit) {
const cacheKey = createHash('sha1')
.update(state.url)
.digest('base64');
const cacheKey = createHash("sha1").update(state.url).digest("base64");
try {
await saveCache([state.bunPath], cacheKey);
process.exit(0);