{"record":{"id":"dd0d5449ccd2850b","repo":"denoland/deno","slug":"no-desktop-file-found-in","errorCode":null,"errorMessage":"no .desktop file found in {}","messagePattern":"no \\.desktop file found in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":817,"sourceCode":"    plist::Value::Array(vec![plist::Value::Dictionary(url_type)]),\n  );\n\n  plist::to_file_xml(&plist_path, &dict)\n    .with_context(|| format!(\"failed to write {}\", plist_path.display()))?;\n  Ok(())\n}\n\n/// Linux: add `x-scheme-handler/<scheme>` MIME types to the `.desktop` entry\n/// and make sure `Exec=` forwards the opened URL via the `%u` field code.\nfn register_deep_links_linux(\n  bundle_path: &Path,\n  schemes: &[String],\n) -> Result<(), AnyError> {\n  let desktop_file = std::fs::read_dir(bundle_path)?\n    .filter_map(|e| e.ok().map(|e| e.path()))\n    .find(|p| p.extension().is_some_and(|e| e == \"desktop\"))\n    .ok_or_else(|| {\n      deno_core::anyhow::anyhow!(\n        \"no .desktop file found in {}\",\n        bundle_path.display()\n      )\n    })?;\n\n  let contents = std::fs::read_to_string(&desktop_file)?;\n  let mime = schemes\n    .iter()\n    .map(|s| format!(\"x-scheme-handler/{s};\"))\n    .collect::<String>();\n\n  let mut out = String::with_capacity(contents.len() + mime.len() + 16);\n  let mut wrote_mime = false;\n  for line in contents.lines() {\n    if let Some(rest) = line.strip_prefix(\"Exec=\") {\n      // The launcher must receive the URL as an argument, so ensure a `%u`\n      // field code is present exactly once.\n      if rest.contains(\"%u\") || rest.contains(\"%U\") {","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/desktop.rs#L799-L835","documentation":"Error \"no .desktop file found in {}\" thrown in denoland/deno.","triggerScenarios":"Thrown at cli/tools/desktop.rs:817 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}