From 02c0817c8fcec1be53403fd2f7ae331c4939bab1 Mon Sep 17 00:00:00 2001 From: Yue Yang Date: Sat, 7 Oct 2023 23:44:25 +0800 Subject: [PATCH] fix: save only when the cache is not hit --- src/setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup.ts b/src/setup.ts index 569ca56..f562ed4 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -59,7 +59,7 @@ export default async (options?: { "Downloaded a new version of Bun, but failed to check its version? Try again in debug mode." ); } - if (cacheEnabled) { + if (cacheEnabled && !cacheHit) { try { await saveCache([path], cacheKey); } catch (error) {