{"record":{"id":"754a52d3574d241e","repo":"Hmbown/CodeWhale","slug":"self-update-is-not-supported-on-harmonyos-openharm","errorCode":null,"errorMessage":"self-update is not supported on HarmonyOS/OpenHarmony yet","messagePattern":"self-update is not supported on HarmonyOS/OpenHarmony yet","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":2308,"sourceCode":"            stdout.write_all(render_completion_script(shell).as_bytes())?;\n            stdout.flush()?;\n            Ok(())\n        }\n        Some(Commands::Metrics(args)) => run_metrics_command(args),\n        Some(Commands::Update(args)) => {\n            let resolved_runtime =\n                resolve_runtime_for_diagnostic_dispatch(&store, &runtime_overrides);\n            let session = start_cli_telemetry(\n                &resolved_runtime,\n                Some(store.path().to_path_buf()),\n                Surface::Cli,\n            );\n            #[cfg(not(target_env = \"ohos\"))]\n            let outcome = update::run_update(args.beta, args.check, args.proxy);\n            #[cfg(target_env = \"ohos\")]\n            let outcome = {\n                let _ = args;\n                Err(anyhow!(\n                    \"self-update is not supported on HarmonyOS/OpenHarmony yet\"\n                ))\n            };\n            finish_cli_telemetry(session, &outcome);\n            outcome\n        }\n        Some(Commands::Providers(args)) => run_providers_command(args),\n        None => {\n            let resolved_runtime = resolve_runtime_for_dispatch(&mut store, &runtime_overrides);\n            let forwarded = root_tui_passthrough(&cli)?;\n            run_tui_in_process(&cli, &resolved_runtime, forwarded)\n        }\n    }\n}\n\nfn root_tui_passthrough(cli: &Cli) -> Result<Vec<String>> {\n    let mut forwarded = Vec::new();\n    if cli.continue_session {","sourceCodeStart":2290,"sourceCodeEnd":2326,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L2290-L2326","documentation":"The built-in self-update command is not implemented for the HarmonyOS/OpenHarmony (ohos) target; on that platform `update run` is compiled to a stub that always returns this error. The CLI self-update mechanism itself has no ohos packaging/distribution path yet.","triggerScenarios":"Running `codewhale update` (self-update subcommand) on a build compiled with target_env = \"ohos\".","commonSituations":"Using the CLI on HarmonyOS/OpenHarmony devices or an ohos-cross-compiled build and attempting an in-place upgrade.","solutions":["Upgrade Codewhale through the platform's package manager or app distribution channel instead","Download and install a newer release manually for the ohos target","Check release notes for when ohos self-update support lands"],"exampleFix":"// before (on ohos)\n$ codewhale update\n// after: update via platform package manager, e.g.\n$ hpm update codewhale   # or reinstall from the vendor distribution channel","handlingStrategy":"fallback","validationCode":"// skip self-update on ohos targets\n#[cfg(target_env = \"ohos\")]\nlet can_self_update = false;\n#[cfg(not(target_env = \"ohos\"))]\nlet can_self_update = true;\nif !can_self_update { eprintln!(\"use the platform package manager to update on ohos\"); }","typeGuard":null,"tryCatchPattern":"match update_result {\n    Err(e) if e.to_string().contains(\"HarmonyOS/OpenHarmony\") => {\n        eprintln!(\"falling back to platform-managed update\");\n        platform_update()?;\n    }\n    other => other?,\n}","preventionTips":["On ohos, never script `codewhale update`; use the vendor distribution channel","Gate update commands behind an OS check in automation","Track release notes for ohos self-update support before enabling it in tooling"],"tags":["platform","self-update","ohos"],"backgroundTag":"unsupported-platform","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}