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:
@@ -3900,6 +3900,11 @@ function install(isGlobal, runtime = 'claude') {
|
||||
}
|
||||
}
|
||||
|
||||
// Clear stale update cache so next session re-evaluates hook versions
|
||||
// targetDir is e.g. ~/.claude/get-shit-done/, parent is the config dir
|
||||
const updateCacheFile = path.join(path.dirname(targetDir), 'cache', 'gsd-update-check.json');
|
||||
try { fs.unlinkSync(updateCacheFile); } catch (e) { /* cache may not exist yet */ }
|
||||
|
||||
if (failures.length > 0) {
|
||||
console.error(`\n ${yellow}Installation incomplete!${reset} Failed: ${failures.join(', ')}`);
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user