Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zoto_ff committed Sep 29, 2024
1 parent a25a0f3 commit a70f372
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions src/cache-save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a70f372

Please sign in to comment.