Skip to content

fix(cli): stop uninstall --help from performing a real uninstall - #1641

Merged
DeusData merged 1 commit into
mainfrom
fix/uninstall-help-destroys
Aug 15, 2026
Merged

fix(cli): stop uninstall --help from performing a real uninstall#1641
DeusData merged 1 commit into
mainfrom
fix/uninstall-help-destroys

Conversation

@DeusData

Copy link
Copy Markdown
Owner

fix(cli): stop uninstall --help from performing a real uninstall

codebase-memory-mcp uninstall --help removed the binary and every agent
configuration (#1038). It did the destructive thing to someone asking what the
command does.

The top-level dispatcher matches the subcommand at argv[1] and forwards the rest,
so its own --help check at src/main.c:1047 never sees argv[2]. Nothing downstream
looked either, and cbm_cmd_uninstall went straight to parse_auto_answer.

The guard is checked FIRST, before parse_auto_answer, so a -y elsewhere on the
line cannot auto-confirm the destruction we are trying to prevent. It prints real
usage, states plainly that the command is destructive, and points at --dry-run.

--help is the flag a person types precisely BECAUSE they are unsure what a
command does. It must never be the thing that destroys their install.

cli suite: 271 passed.

`codebase-memory-mcp uninstall --help` removed the binary and every agent
configuration (#1038). It did the destructive thing to someone asking what the
command does.

The top-level dispatcher matches the subcommand at argv[1] and forwards the rest,
so its own --help check at src/main.c:1047 never sees argv[2]. Nothing downstream
looked either, and cbm_cmd_uninstall went straight to parse_auto_answer.

The guard is checked FIRST, before parse_auto_answer, so a `-y` elsewhere on the
line cannot auto-confirm the destruction we are trying to prevent. It prints real
usage, states plainly that the command is destructive, and points at --dry-run.

--help is the flag a person types precisely BECAUSE they are unsure what a
command does. It must never be the thing that destroys their install.

cli suite: 271 passed.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData
DeusData force-pushed the fix/uninstall-help-destroys branch from 146a522 to a530c8a Compare August 15, 2026 00:51
@DeusData
DeusData merged commit a598a5a into main Aug 15, 2026
35 checks passed
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.

1 participant