{"record":{"id":"dd381214976f0377","repo":"openai/codex","slug":"curl-download-failed-with-status","errorCode":null,"errorMessage":"curl download failed with {status}","messagePattern":"curl download failed with (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/cli/src/desktop_app/mac.rs","lineNumber":253,"sourceCode":"async fn download_dmg(url: &str, dest: &Path) -> anyhow::Result<()> {\n    eprintln!(\"Downloading installer...\");\n    let status = Command::new(\"curl\")\n        .arg(\"-fL\")\n        .arg(\"--retry\")\n        .arg(\"3\")\n        .arg(\"--retry-delay\")\n        .arg(\"1\")\n        .arg(\"-o\")\n        .arg(dest)\n        .arg(url)\n        .status()\n        .await\n        .context(\"failed to invoke `curl`\")?;\n\n    if status.success() {\n        return Ok(());\n    }\n    anyhow::bail!(\"curl download failed with {status}\");\n}\n\nasync fn mount_dmg(dmg_path: &Path) -> anyhow::Result<PathBuf> {\n    let output = Command::new(\"hdiutil\")\n        .arg(\"attach\")\n        .arg(\"-nobrowse\")\n        .arg(\"-readonly\")\n        .arg(dmg_path)\n        .output()\n        .await\n        .context(\"failed to invoke `hdiutil attach`\")?;\n\n    if !output.status.success() {\n        anyhow::bail!(\n            \"`hdiutil attach` failed with {status}: {stderr}\",\n            status = output.status,\n            stderr = String::from_utf8_lossy(&output.stderr)\n        );","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/cli/src/desktop_app/mac.rs#L235-L271","documentation":"Error \"curl download failed with {status}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/cli/src/desktop_app/mac.rs:253 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":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}