mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
format
This commit is contained in:
parent
a25a0f3a6e
commit
a70f372af9
2 changed files with 4 additions and 8 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue