Skip to content

CM-71886 uninstall preserve hooks file - #537

Merged
Ilanlido merged 4 commits into
mainfrom
CM-71886-uninstall-preserve-hooks-file
Sep 2, 2026
Merged

CM-71886 uninstall preserve hooks file#537
Ilanlido merged 4 commits into
mainfrom
CM-71886-uninstall-preserve-hooks-file

Conversation

@Ilanlido

@Ilanlido Ilanlido commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Keep the hooks file on uninstall instead of unlinking it
When Cycode's hooks were the only hooks left, uninstall deleted the whole file and with it any unrelated top-level keys (mcpServers, permissions, ...)
in a shared settings file such as Claude Code's settings.json. Drop the emptied hooks key and write the remainder back instead.

Ilanlido and others added 2 commits September 2, 2026 12:06
When Cycode's hooks were the only hooks left, uninstall deleted the whole
file and with it any unrelated top-level keys (mcpServers, permissions, ...)
in a shared settings file such as Claude Code's settings.json. Drop the
emptied hooks key and write the remainder back instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

The user-scope Claude Code path is built from Path.home() at import time,
which pyfakefs does not intercept on Python 3.9, so the test only passed
where a real ~/.claude/settings.json happened to exist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Ilanlido
Ilanlido enabled auto-merge (squash) September 2, 2026 12:47
@Ilanlido
Ilanlido merged commit 1ad4ce2 into main Sep 2, 2026
28 checks passed
@Ilanlido
Ilanlido deleted the CM-71886-uninstall-preserve-hooks-file branch September 2, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants