denoland/deno · error · AnyError

Downloaded artifact does not contain '{exe_name}'.

Error message

Downloaded artifact does not contain '{exe_name}'.

What it means

Branch-flow counterpart of the PR 'artifact does not contain exe' check: after a successful artifact download, the extracted directory must contain `deno`/`deno.exe`; if not, Deno bails with this terse message. It indicates an artifact layout/packaging problem rather than a download-availability problem (which 1691 already covers).

Source

Thrown at cli/tools/upgrade.rs:940

      }
    }
    if downloaded {
      break;
    }
  }

  if !downloaded {
    bail!(
      "Could not find a \"{artifact_name}\" artifact for branch '{branch}'.\n\
       Artifacts may have expired or CI may not have completed."
    );
  }

  let exe_name = if cfg!(windows) { "deno.exe" } else { "deno" };
  let new_exe_path = download_dir.join(exe_name);

  if !new_exe_path.exists() {
    bail!("Downloaded artifact does not contain '{exe_name}'.");
  }

  #[cfg(unix)]
  {
    use std::os::unix::fs::PermissionsExt;
    fs::set_permissions(&new_exe_path, std::fs::Permissions::from_mode(0o755))?;
  }

  check_exe(&new_exe_path)?;

  if upgrade_flags.dry_run {
    log::info!("Upgraded successfully (dry run)");
    drop(temp_dir);
    return Ok(());
  }

  let current_exe_path = std::env::current_exe()
    .context("failed to get the path of the current executable")?;

View on GitHub (pinned to 9ad36f7a2c)

Solutions

  1. Manually download the artifact (`gh run download <run-id> -n <artifact> --repo denoland/deno`) and inspect its layout to see where the binary landed.
  2. Retry the upgrade once to rule out a truncated download.
  3. If the layout genuinely changed, report it and build the branch locally meanwhile.
  4. Free temp-dir space if extraction is failing silently.
Defensive patterns

Strategy: fallback

Validate before calling

tmp=$(mktemp -d)
gh run download <run-id> -n debug-linux-x86_64-deno --repo denoland/deno -D "$tmp" 2>/dev/null
test -x "$tmp/deno" || { echo "artifact has no root deno binary"; exit 1; }

Try / catch

deno upgrade --branch "$BRANCH" 2>err.log || { grep -q 'does not contain' err.log && cargo build --bin deno; }

Prevention

When it happens

Trigger: A branch CI artifact whose zip lacks the binary at its root — renamed/moved binary, nested directory layout, wrong artifact type downloaded, or a truncated extraction leaving the exe missing while the download step still reported success.

Common situations: CI packaging changes on active development branches; flaky downloads leaving partial extracts; disk pressure in the temp dir.

Related errors


AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20). Data as JSON: /api/errors/39dcd17c43b5a841. Report an issue: GitHub.