mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-04-02 01:30:17 +08:00
Update action.ts
This commit is contained in:
parent
68fd46c4a3
commit
aea58ec4e7
@ -1,3 +1,4 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { homedir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import {
|
||||
@ -73,7 +74,11 @@ export default async (options: Input): Promise<Output> => {
|
||||
let revision: string | undefined;
|
||||
let cacheHit = false;
|
||||
if (cacheEnabled) {
|
||||
const cacheRestored = await restoreCache([bunPath], url);
|
||||
const cacheKey = createHash('sha1')
|
||||
.update(url)
|
||||
.digest('base64');
|
||||
|
||||
const cacheRestored = await restoreCache([bunPath], cacheKey);
|
||||
if (cacheRestored) {
|
||||
revision = await getRevision(bunPath);
|
||||
if (revision) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user