{"record":{"id":"0da8cd8bb15083b1","repo":"BigPizzaV3/CodexPlusPlus","slug":"error-0da8cd","errorCode":null,"errorMessage":"当前平台不支持启动安装包","messagePattern":"当前平台不支持启动安装包","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/codex-plus-core/src/update.rs","lineNumber":433,"sourceCode":"            .creation_flags(crate::windows_integration::CREATE_NO_WINDOW)\n            .spawn()\n            .map(|_| ())\n            .map_err(|error| anyhow::anyhow!(\"启动安装包失败：{error}\"))\n    }\n\n    #[cfg(target_os = \"macos\")]\n    {\n        std::process::Command::new(\"open\")\n            .arg(path)\n            .spawn()\n            .map(|_| ())\n            .map_err(|error| anyhow::anyhow!(\"打开 DMG 失败：{error}\"))\n    }\n\n    #[cfg(all(not(windows), not(target_os = \"macos\")))]\n    {\n        let _ = path;\n        anyhow::bail!(\"当前平台不支持启动安装包\")\n    }\n}\n","sourceCodeStart":415,"sourceCodeEnd":436,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/update.rs#L415-L436","documentation":"launch_installer opens the downloaded update installer with a platform-specific command (Windows ShellExecute-style open, macOS `open` for DMG). The `#[cfg(all(not(windows), not(target_os = \"macos\")))]` fallback arm intentionally does nothing but bail: on Linux/BSD and other platforms there is no supported installer-launch mechanism in this code path.","triggerScenarios":"Calling perform_update → launch_installer on a non-Windows, non-macOS platform (e.g. Linux) after downloading the release asset; or a build where the platform cfg arms above were compiled out.","commonSituations":"Running the desktop manager on Linux and clicking 'update now'; CI containers on ubuntu images exercising the update flow; architectures where the matched platform_asset_rank picks a generic archive rather than a launchable installer.","solutions":["On Linux, skip the auto-launch step and instead run the downloaded installer/archive manually.","Add a Linux arm to launch_installer (e.g. make the AppImage executable and spawn it) if your fork targets Linux.","Gate the 'launch installer' UI action by platform so Linux users get a 'download complete, install manually' message."],"exampleFix":"// before (caller)\nperform_update(...)?; // implicitly launches installer\n// after\nif cfg!(any(windows, target_os = \"macos\")) {\n    perform_update(...)?;\n} else {\n    download_update_only(...)?; // user installs manually\n}","handlingStrategy":"fallback","validationCode":"#[cfg(all(not(windows), not(target_os = \"macos\")))]\nlet can_auto_launch = false;\n#[cfg(any(windows, target_os = \"macos\"))]\nlet can_auto_launch = true;\nif can_auto_launch { perform_update(...)?; } else { show_manual_install_instructions(); }","typeGuard":null,"tryCatchPattern":"if let Err(e) = perform_update(...) {\n    if e.to_string().contains(\"当前平台不支持启动安装包\") {\n        open_downloaded_file_location(); // let user install manually\n    } else { return Err(e); }\n}","preventionTips":["Hide auto-launch UI on platforms without installer support.","Provide a manual install doc path for Linux users.","Consider implementing a Linux arm (chmod +x AppImage and spawn) in your fork."],"tags":["platform","update","installer","unsupported"],"backgroundTag":"unsupported-platform","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}