mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
fix(npm): no cache fallback without an absolute home directory
The release-gate Codex review found the relative-path fix incomplete: with XDG_CACHE_HOME unset and HOME empty or relative, the fallback was `.cache/...` under the current directory, so a checkout could plant the binary the launcher runs. Use the home cache only when the home path is absolute; otherwise the package's bin/ is the only location. npm smoke plants such a binary and checks it is never run (it was, before this). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
parent
3041606916
commit
d2cd7115f1
3 changed files with 44 additions and 17 deletions
|
|
@ -56,7 +56,8 @@ The binary goes in the package's `bin/`, or, when that is not writable (a
|
|||
root-owned `sudo npm install -g` whose postinstall npm 12 skipped), in a
|
||||
per-user cache: `$XDG_CACHE_HOME` (if absolute), else `~/.cache`
|
||||
(`~/Library/Caches` on macOS), under `<package>/<version>/<platform>-<arch>/`.
|
||||
The launcher looks in both. A
|
||||
The launcher looks in both. With no absolute cache root (an empty or relative
|
||||
`HOME`) there is no fallback, so nothing under the current directory is run. A
|
||||
termination signal during that first-run download stops the installer too,
|
||||
and it removes its partial file.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue