* fix(#2784): clear shared ~/.cache/gsd/ cache in update workflow The SessionStart hook (hooks/gsd-check-update.js) writes update-check results to $HOME/.cache/gsd/gsd-update-check.json (shared, tool-agnostic). The update.md run_update step only cleared per-runtime paths like ~/.claude/cache/gsd-update-check.json, so the statusline kept showing the stale upgrade indicator after a successful update. Fix: add rm -f "$HOME/.cache/gsd/gsd-update-check.json" to the cache-clear block in the run_update step. Regression test: tests/bug-2784-update-cache-clear-path.test.cjs * fix(#2784): address CodeRabbit review — four edge-cases count, bash fence, structured test assertions
This commit is contained in:
@@ -539,6 +539,11 @@ for dir in .claude .config/opencode .opencode .gemini .config/kilo .kilo .codex;
|
||||
rm -f "./$dir/cache/gsd-update-check.json"
|
||||
rm -f "$HOME/$dir/cache/gsd-update-check.json"
|
||||
done
|
||||
|
||||
# Clear the shared tool-agnostic cache written by gsd-check-update.js hook (#2784).
|
||||
# The hook uses ~/.cache/gsd/gsd-update-check.json regardless of runtime; clear it
|
||||
# so the statusline stops showing the stale "⬆ /gsd-update" indicator after update.
|
||||
rm -f "$HOME/.cache/gsd/gsd-update-check.json"
|
||||
```
|
||||
|
||||
The SessionStart hook (`gsd-check-update.js`) writes to the detected runtime's cache directory, so preferred/env-derived paths and default paths must all be cleared to prevent stale update indicators.
|
||||
|
||||
Reference in New Issue
Block a user