Skip to content

fix: harden bun cache cleanup#83

Merged
darcyclarke merged 1 commit intovltpkg:mainfrom
vltbaudbot:fix/bun-cache-cleanup
Mar 25, 2026
Merged

fix: harden bun cache cleanup#83
darcyclarke merged 1 commit intovltpkg:mainfrom
vltbaudbot:fix/bun-cache-cleanup

Conversation

@vltbaudbot
Copy link
Copy Markdown
Contributor

Summary

Harden the clean_bun_cache() function to ensure all bun caches are fully cleaned between benchmark runs.

Changes

  • Remove $HOME/.bun/install (entire directory) instead of just $HOME/.bun/install/cache — catches metadata files that live outside cache/
  • Add guard for $BUN_INSTALL_CACHE_DIR — if this env var is set to a custom location, that directory is also removed

Context

The existing cleanup (bun pm cache rm + removing ~/.bun/install/cache) covers the main package cache but misses potential metadata files in ~/.bun/install/ outside the cache/ subdirectory. Also adds a safety net for environments where BUN_INSTALL_CACHE_DIR points to a non-default location.


Co-authored-by: Darcy Clarke darcy@darcyclarke.me

- Remove $HOME/.bun/install (entire directory) instead of just
  $HOME/.bun/install/cache — catches metadata files outside cache/
- Guard against BUN_INSTALL_CACHE_DIR pointing to a custom location

Co-authored-by: Darcy Clarke <darcy@darcyclarke.me>
@darcyclarke darcyclarke merged commit 8a703c6 into vltpkg:main Mar 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants