fix: save only when the cache is not hit

This commit is contained in:
Yue Yang 2023-10-07 23:44:25 +08:00 committed by GitHub
parent bd26ebd2c7
commit 02c0817c8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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." "Downloaded a new version of Bun, but failed to check its version? Try again in debug mode."
); );
} }
if (cacheEnabled) { if (cacheEnabled && !cacheHit) {
try { try {
await saveCache([path], cacheKey); await saveCache([path], cacheKey);
} catch (error) { } catch (error) {