Repository navigation
fix: correct init guidance, register deactivate command, fill LICENSE copyright - #24
Merged
Merged
Conversation
… copyright Fixes three small but user-facing issues from the §1 triage: - init: the "Next steps" guidance pointed at the removed `cwm build` command, so first-time users following the printed instructions always hit an error. Now points at `cwm ws build`. - deactivate: `deactivate` was never registered as a CLI command, so running `cwm deactivate` without shell integration fell through to the colcon passthrough and produced a confusing `colcon deactivate` error. Register it as a real command (symmetric with `cd`/`switch`) that prints a shell-integration hint instead. - LICENSE: replaced the Apache template placeholder `Copyright [yyyy] [name of copyright owner]` with the actual copyright holder.
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.
Summary
Fixes three small, user-facing issues from the §1 (High-value × Small) triage. All non-breaking; no behaviour change to existing flows.
cwm init's "Next steps" printedcwm build, which was moved tows build(main.pymoved_commands). A first-time user following the printed instructions always hit an error. Now points atcwm ws build(cli/init_cmd.py).deactivateunregistered —deactivatewas never registered as a CLI command, socwm deactivatewithout shell integration fell through to the colcon passthrough and produced a confusingcolcon deactivateerror. Registered as a real command (symmetric withcd/switch) that prints a shell-integration hint instead (cli/activate_cmd.py,cli/main.py). With shell integration active, thecwm()function still interceptsdeactivateand calls the shell function fromcwm activate, so the CLI command is only reached when integration is not set up — exactly where the hint helps.Copyright [yyyy] [name of copyright owner]with the actual holder (LICENSE).Reuse / design notes
deactivatecommand mirrors the existingcd/switchhint pattern (cli/cd_cmd.py): a visible command that raises aClickExceptionwith setup guidance, preventing the colcon passthrough from swallowing it.cli.command_orderright afteractivateso help output keeps the activate/deactivate pair together.Tests
test_cd_cmd.py: newTestDeactivateCommand(exit≠0, output contains "shell integration"), matchingTestCdCommand/TestSwitchCommand.test_cli_structure.py: addeddeactivateto the expected top-level command order.Verification (manual)
cwm deactivate(no shell integration) prints the shell-init hint and exits 1, instead of a colcon error.cwm --helplistsdeactivatedirectly afteractivate.cwm init"Next steps" showscwm ws build.