{"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":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":1987,"sourceCode":"            let mut cmd = Cli::command();\n            generate(shell, &mut cmd, \"codewhale\", &mut io::stdout());\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        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 {\n        forwarded.push(\"--continue\".to_string());","sourceCodeStart":1969,"sourceCodeEnd":2005,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/cli/src/lib.rs#L1969-L2005","documentation":"On HarmonyOS/OpenHarmony builds (cfg(target_env = \"ohos\")) the `codewhale update` command has no self-update implementation and returns this error instead of attempting in-place binary replacement. It is a hard platform limitation of the shipped build.","triggerScenarios":"Executing `codewhale update [--beta|--check]` on any ohos-targeted build of the CLI.","commonSituations":"Cross-compiled deployments on HarmonyOS devices; CI images or automation built for ohos that still call update as on other platforms.","solutions":["Update through the channel that installed the binary: package manager, hdc push of a rebuilt binary, or re-flashing the app bundle","Remove update steps from ohos deployment scripts and use --check-only flows elsewhere","Track upstream releases for ohos self-update support before re-enabling it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# In deployment scripts, feature-detect before calling update:\n if codewhale --version | grep -q ohos; then\n   echo \"self-update unavailable on OHOS; redeploy via package channel\"\n else\n   codewhale update\n fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Exclude update from ohos automation; update through the packaging channel instead","Gate update in shared scripts on platform detection","Watch upstream release notes for ohos self-update support"],"tags":["cli","self-update","ohos","harmonyos","platform","rust"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}