Repository navigation
fix(installer): purge the cache dir the runtime writes on macOS - #3538
Merged
Merged
Conversation
`--uninstall --purge` removed the data, state and cache trees where the
installer resolves them, `${XDG_CACHE_HOME:-~/.cache}/minimal` for the
cache. On macOS the runtime takes its cache from the platform cache
directory, `~/Library/Caches/minimal`, so the purge left that tree behind.
The purge now also removes each tree where the runtime writes it, through a
resolver that mirrors crates/paths: an XDG variable counts only when it is
absolute, and the macOS cache is `~/Library/Caches/minimal`. Only an
absolute `.../minimal` path is purged, so a relative XDG value no longer
resolves against the current directory.
Fixes gominimal/inbox#1177
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 53 minutes for your next included review. View limit details
|
Contributor
|
Approved: no findings at Nothing to do. Clobber: none seen. |
norrietaylor
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
--uninstall --purgenow removes~/Library/Caches/minimalon macOS. It used to leave that tree behind.Fixes gominimal/inbox#1177
Why
The installer resolved the cache as
${XDG_CACHE_HOME:-~/.cache}/minimal. On macOS the runtime takes its cache from the platform cache directory, so the purge looked in a place the runtime never wrote.How
The purge resolves each tree (data, state, cache) the way the runtime does, as well as the way the installer did:
~/Library/Caches/minimal.One tightening
Only an absolute path that ends in
/minimalis purged. A relative XDG value used to resolve against the current directory; it is now ignored.Testing
scripts/install_test.shgains a macOS case: a dry run names~/Library/Caches/minimal, and a real purge removes it and the XDG cache tree. It also drives the absolute-path rule with a relative XDG value.The installer tests pass under sh, bash and dash. Workspace lint, tests and the native end-to-end script pass on this commit.
🤖 Generated with Claude Code