fix: honor CLAUDE_CONFIG_DIR in hooks (#37)
ponytail-activate.js and ponytail-runtime.js hardcoded ~/.claude for the flag file and settings lookup, ignoring CLAUDE_CONFIG_DIR. Add a shared getClaudeDir() to ponytail-config.js and use it in both. Regression test added to hooks.test.js. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
6d990f8c54
commit
01578c0cd4
@@ -8,8 +8,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
const { getDefaultMode } = require('./ponytail-config');
|
||||
const { getDefaultMode, getClaudeDir } = require('./ponytail-config');
|
||||
const { getPonytailInstructions } = require('./ponytail-instructions');
|
||||
const {
|
||||
clearMode,
|
||||
@@ -18,7 +17,7 @@ const {
|
||||
writeHookOutput,
|
||||
} = require('./ponytail-runtime');
|
||||
|
||||
const claudeDir = path.join(os.homedir(), '.claude');
|
||||
const claudeDir = getClaudeDir();
|
||||
const settingsPath = path.join(claudeDir, 'settings.json');
|
||||
|
||||
const mode = getDefaultMode();
|
||||
|
||||
Reference in New Issue
Block a user