Use absolute path for sandlot-activity binary in Claude hooks
This commit is contained in:
parent
f9f87862b0
commit
a6f6d8b067
|
|
@ -67,9 +67,10 @@ export async function create(log?: (msg: string) => void): Promise<void> {
|
||||||
log?.("Warning: ANTHROPIC_API_KEY not found in ~/.env — claude will require manual login")
|
log?.("Warning: ANTHROPIC_API_KEY not found in ~/.env — claude will require manual login")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const activityBin = `/home/${USER}/.local/bin/sandlot-activity`
|
||||||
const hooks = {
|
const hooks = {
|
||||||
UserPromptSubmit: [{ hooks: [{ type: "command", command: "sandlot-activity active" }] }],
|
UserPromptSubmit: [{ hooks: [{ type: "command", command: `${activityBin} active` }] }],
|
||||||
Stop: [{ hooks: [{ type: "command", command: "sandlot-activity idle" }] }],
|
Stop: [{ hooks: [{ type: "command", command: `${activityBin} idle` }] }],
|
||||||
}
|
}
|
||||||
const settingsJson = JSON.stringify(apiKey
|
const settingsJson = JSON.stringify(apiKey
|
||||||
? { apiKeyHelper: "~/.claude/api-key-helper.sh", skipDangerousModePermissionPrompt: true, hooks }
|
? { apiKeyHelper: "~/.claude/api-key-helper.sh", skipDangerousModePermissionPrompt: true, hooks }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user