{"record":{"id":"7ec426303f553d77","repo":"BigPizzaV3/CodexPlusPlus","slug":"windows-shortcuts-are-only-supported-on-windows","errorCode":null,"errorMessage":"Windows shortcuts are only supported on Windows","messagePattern":"Windows shortcuts are only supported on Windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/install/windows.rs","lineNumber":127,"sourceCode":"        r\"{DREAM_SKIN_URL_PROTOCOL_SUBKEY}\\shell\\open\"\n    ));\n    let _ = crate::windows_integration::delete_current_user_key(&format!(\n        r\"{DREAM_SKIN_URL_PROTOCOL_SUBKEY}\\shell\"\n    ));\n    let _ = crate::windows_integration::delete_current_user_key(DREAM_SKIN_URL_PROTOCOL_SUBKEY);\n    let _ = crate::windows_integration::delete_current_user_key(LEGACY_UNINSTALL_SUBKEY);\n    let _ = crate::windows_integration::delete_current_user_key(UNINSTALL_SUBKEY);\n    Ok(())\n}\n\n#[cfg(not(windows))]\npub fn install_shortcuts(_options: &InstallOptions) -> anyhow::Result<()> {\n    anyhow::bail!(\"Windows shortcuts are only supported on Windows\")\n}\n\n#[cfg(not(windows))]\npub fn uninstall_shortcuts(_options: &InstallOptions) -> anyhow::Result<()> {\n    anyhow::bail!(\"Windows shortcuts are only supported on Windows\")\n}\n\n#[cfg(windows)]\nfn create_entrypoint_shortcut(\n    path: PathBuf,\n    target: PathBuf,\n    description: &str,\n    icon: PathBuf,\n) -> anyhow::Result<()> {\n    crate::windows_integration::create_shortcut(&crate::windows_integration::ShortcutSpec {\n        working_directory: target.parent().map(Path::to_path_buf),\n        path,\n        target,\n        arguments: String::new(),\n        description: description.to_string(),\n        icon: Some(icon),\n        show_minimized: false,\n    })","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/install/windows.rs#L109-L145","documentation":"Thrown by install_shortcuts compiled under cfg(not(windows)) — the stub implementation that exists so non-Windows builds still link. Any call to install Windows shortcuts (Run key, uninstall entries, URL protocol subkeys) on a non-Windows host hits this sentinel; the trigger is the platform mismatch itself, and the uninstall_shortcuts caller path surfaces it.","triggerScenarios":"Thrown at crates/codex-plus-core/src/install/windows.rs:127 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["在 Windows 平台调用快捷方式安装/卸载","非 Windows 平台走各自的 platform_install 路径"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}