fix(pkgman): honor XDG_CACHE_HOME and keep the previous install until the new one is complete - #335
Merged
Merged
Conversation
… the new one is complete Stage the extracted browser next to INSTALL_DIR and swap it in only after download, extraction and version stamping succeed, so a failed fetch no longer removes a working install. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fu1933SSDGKaJnTEvu4c5b
…gnore relative XDG_CACHE_HOME Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fu1933SSDGKaJnTEvu4c5b
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical install-recovery and concurrency issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates package installation to honor XDG cache settings and stage replacements safely.
Changes:
- Supports absolute
XDG_CACHE_HOMEon Linux. - Stages downloads and extraction before replacing installations.
- Adds tests and documentation for cache and install behavior.
File summaries
| File | Summary |
|---|---|
src/pkgman.ts |
Implements cache resolution and staged installation, but requires fixes for interrupted swaps, symlinked install paths, and concurrent installs. |
test/pkgman.test.ts |
Adds coverage for cache resolution and installation behavior. |
README.md |
Documents XDG cache and install directory configuration. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…inked install dir Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fu1933SSDGKaJnTEvu4c5b
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fu1933SSDGKaJnTEvu4c5b
Pijukatel
marked this pull request as ready for review
September 18, 2026 06:07
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.
userCacheDirhonors an absoluteXDG_CACHE_HOMEon Linux.install()extracts into a sibling staging dir and swaps it in only after download, extraction and version stamping succeed, so a failed fetch keeps the previous install. A symlinked install dir keeps its link; the target is replaced.Closes: #334