{"record":{"id":"39dcd17c43b5a841","repo":"denoland/deno","slug":"downloaded-artifact-does-not-contain-exe-name","errorCode":null,"errorMessage":"Downloaded artifact does not contain '{exe_name}'.","messagePattern":"Downloaded artifact does not contain '(.+?)'\\.","errorType":"exception","errorClass":"AnyError","httpStatus":null,"severity":"error","filePath":"cli/tools/upgrade.rs","lineNumber":940,"sourceCode":"      }\n    }\n    if downloaded {\n      break;\n    }\n  }\n\n  if !downloaded {\n    bail!(\n      \"Could not find a \\\"{artifact_name}\\\" artifact for branch '{branch}'.\\n\\\n       Artifacts may have expired or CI may not have completed.\"\n    );\n  }\n\n  let exe_name = if cfg!(windows) { \"deno.exe\" } else { \"deno\" };\n  let new_exe_path = download_dir.join(exe_name);\n\n  if !new_exe_path.exists() {\n    bail!(\"Downloaded artifact does not contain '{exe_name}'.\");\n  }\n\n  #[cfg(unix)]\n  {\n    use std::os::unix::fs::PermissionsExt;\n    fs::set_permissions(&new_exe_path, std::fs::Permissions::from_mode(0o755))?;\n  }\n\n  check_exe(&new_exe_path)?;\n\n  if upgrade_flags.dry_run {\n    log::info!(\"Upgraded successfully (dry run)\");\n    drop(temp_dir);\n    return Ok(());\n  }\n\n  let current_exe_path = std::env::current_exe()\n    .context(\"failed to get the path of the current executable\")?;","sourceCodeStart":922,"sourceCodeEnd":958,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/tools/upgrade.rs#L922-L958","documentation":"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).","triggerScenarios":"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.","commonSituations":"CI packaging changes on active development branches; flaky downloads leaving partial extracts; disk pressure in the temp dir.","solutions":["Manually download the artifact (`gh run download <run-id> -n <artifact> --repo denoland/deno`) and inspect its layout to see where the binary landed.","Retry the upgrade once to rule out a truncated download.","If the layout genuinely changed, report it and build the branch locally meanwhile.","Free temp-dir space if extraction is failing silently."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"tmp=$(mktemp -d)\ngh run download <run-id> -n debug-linux-x86_64-deno --repo denoland/deno -D \"$tmp\" 2>/dev/null\ntest -x \"$tmp/deno\" || { echo \"artifact has no root deno binary\"; exit 1; }","typeGuard":null,"tryCatchPattern":"deno upgrade --branch \"$BRANCH\" 2>err.log || { grep -q 'does not contain' err.log && cargo build --bin deno; }","preventionTips":["Inspect artifact layout manually when CI packaging changes.","Retry once to rule out truncated extraction.","Keep a from-source build script as the fallback path."],"tags":["upgrade","branch-build","ci-artifacts","download","packaging"],"backgroundTag":"ci-artifact-invalid","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}