fix: clear both cache paths after update (#663) (#664)

The SessionStart hook always writes to ~/.claude/cache/ via os.homedir()
regardless of install type. The update workflow previously only cleared
the install-type-specific path, leaving stale cache at the global path
for local installs.

Clear both ./.claude/cache/ and ~/.claude/cache/ unconditionally.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Foster
2026-02-27 19:34:31 +00:00
committed by GitHub
parent dba401fe54
commit 19ac77e25d

View File

@@ -164,16 +164,12 @@ Capture output. If install fails, show error and exit.
Clear the update cache so statusline indicator disappears:
**If LOCAL install:**
```bash
rm -f ./.claude/cache/gsd-update-check.json
```
**If GLOBAL install:**
```bash
rm -f ~/.claude/cache/gsd-update-check.json
```
(Paths are templated at install time for runtime compatibility)
The SessionStart hook (`gsd-check-update.js`) always writes to `~/.claude/cache/` via `os.homedir()` regardless of install type, so both paths must be cleared to prevent stale update indicators.
</step>
<step name="display_result">