fix(cli): stop uninstall --help from performing a real uninstall - #1641
Merged
Conversation
`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
force-pushed
the
fix/uninstall-help-destroys
branch
from
August 15, 2026 00:51
146a522 to
a530c8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(cli): stop
uninstall --helpfrom performing a real uninstallcodebase-memory-mcp uninstall --helpremoved the binary and every agentconfiguration (#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
-yelsewhere on theline 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.