mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-13 19:44:53 +08:00
Make the CLI point users at the real install source
The next repo-local backlog item was ROADMAP #70: users could mistake third-party pages or the deprecated `cargo install claw-code` path for the official install route. The CLI now surfaces the source of truth directly in `claw doctor` and `claw --help`, and the roadmap closeout records the change. Constraint: Keep the fix inside repo-local Rust CLI surfaces instead of relying on docs alone Rejected: Close #70 with README-only wording | the bug was user-facing CLI ambiguity, so the warning needed to appear in runtime help/doctor output Confidence: high Scope-risk: narrow Reversibility: clean Directive: If install guidance changes later, update both the doctor check payload and the help-text warning together Tested: cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace; architect review APPROVE Not-tested: Third-party websites outside this repo that may still present stale install instructions
This commit is contained in:
@@ -209,7 +209,7 @@ fn doctor_and_resume_status_emit_json_when_requested() {
|
||||
assert!(summary["failures"].as_u64().is_some());
|
||||
|
||||
let checks = doctor["checks"].as_array().expect("doctor checks");
|
||||
assert_eq!(checks.len(), 5);
|
||||
assert_eq!(checks.len(), 6);
|
||||
let check_names = checks
|
||||
.iter()
|
||||
.map(|check| {
|
||||
@@ -221,7 +221,27 @@ fn doctor_and_resume_status_emit_json_when_requested() {
|
||||
.collect::<Vec<_>>();
|
||||
assert_eq!(
|
||||
check_names,
|
||||
vec!["auth", "config", "workspace", "sandbox", "system"]
|
||||
vec![
|
||||
"auth",
|
||||
"config",
|
||||
"install source",
|
||||
"workspace",
|
||||
"sandbox",
|
||||
"system"
|
||||
]
|
||||
);
|
||||
|
||||
let install_source = checks
|
||||
.iter()
|
||||
.find(|check| check["name"] == "install source")
|
||||
.expect("install source check");
|
||||
assert_eq!(
|
||||
install_source["official_repo"],
|
||||
"https://github.com/ultraworkers/claw-code"
|
||||
);
|
||||
assert_eq!(
|
||||
install_source["deprecated_install"],
|
||||
"cargo install claw-code"
|
||||
);
|
||||
|
||||
let workspace = checks
|
||||
|
||||
Reference in New Issue
Block a user