Skip to content

Installation detection in claude/settings.json needs improvement #44

@cr1st1p

Description

@cr1st1p

Hi!
Trying to install it globally, but it seems it considers it already installed.
Did a bash -x run, then looked at code.
It looks like the method to check it is installed is not ok - it just checks for the presence of "something" (could be probably even an empty list !) as keys hooks.Notification OR hooks.Stop.
The 'OR' in there is also another problem. Function has_claude_notify_hooks()

Note that the hooks entry is an array. So key could be missing, array empty, or an array containing or not, the exact command that the 'cn' program would install.
Probably best would be to write an adhoc python3 program - as done in other parts of the code?

Regards.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions