openai/codex · error · anyhow::Error

curl download failed with {status}

Error message

curl download failed with {status}

What it means

Error "curl download failed with {status}" thrown in openai/codex.

Source

Thrown at codex-rs/cli/src/desktop_app/mac.rs:253

async fn download_dmg(url: &str, dest: &Path) -> anyhow::Result<()> {
    eprintln!("Downloading installer...");
    let status = Command::new("curl")
        .arg("-fL")
        .arg("--retry")
        .arg("3")
        .arg("--retry-delay")
        .arg("1")
        .arg("-o")
        .arg(dest)
        .arg(url)
        .status()
        .await
        .context("failed to invoke `curl`")?;

    if status.success() {
        return Ok(());
    }
    anyhow::bail!("curl download failed with {status}");
}

async fn mount_dmg(dmg_path: &Path) -> anyhow::Result<PathBuf> {
    let output = Command::new("hdiutil")
        .arg("attach")
        .arg("-nobrowse")
        .arg("-readonly")
        .arg(dmg_path)
        .output()
        .await
        .context("failed to invoke `hdiutil attach`")?;

    if !output.status.success() {
        anyhow::bail!(
            "`hdiutil attach` failed with {status}: {stderr}",
            status = output.status,
            stderr = String::from_utf8_lossy(&output.stderr)
        );

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/cli/src/desktop_app/mac.rs:253 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/dd381214976f0377. Report an issue: GitHub.