fix: stale hook detection checks wrong directory path
gsd-check-update.js looked for hooks in configDir/hooks/ (e.g., ~/.claude/hooks/) but the installer writes hooks to configDir/get-shit-done/hooks/. This mismatch caused false stale hook warnings that persisted even after updating. Also clears the update cache during install so the next session re-evaluates hook versions with the correct path. Closes #1249 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,9 +65,10 @@ const child = spawn(process.execPath, ['-e', `
|
||||
} catch (e) {}
|
||||
|
||||
// Check for stale hooks — compare hook version headers against installed VERSION
|
||||
// Hooks live inside get-shit-done/hooks/, not configDir/hooks/
|
||||
let staleHooks = [];
|
||||
if (configDir) {
|
||||
const hooksDir = path.join(configDir, 'hooks');
|
||||
const hooksDir = path.join(configDir, 'get-shit-done', 'hooks');
|
||||
try {
|
||||
if (fs.existsSync(hooksDir)) {
|
||||
const hookFiles = fs.readdirSync(hooksDir).filter(f => f.startsWith('gsd-') && f.endsWith('.js'));
|
||||
|
||||
Reference in New Issue
Block a user