{"record":{"id":"d1617388df7065d8","repo":"denoland/deno","slug":"unsupported-platform-for-pr-builds","errorCode":null,"errorMessage":"Unsupported platform for PR builds: {}","messagePattern":"Unsupported platform for PR builds: (.+?)","errorType":"exception","errorClass":"AnyError","httpStatus":null,"severity":"error","filePath":"cli/tools/upgrade.rs","lineNumber":597,"sourceCode":"/// Get the artifact name for the current platform.\n/// CI artifacts are named like `{profile}-{os}-{arch}-deno`.\nfn get_pr_artifact_name() -> Result<String, AnyError> {\n  let target = env!(\"TARGET\");\n\n  let (os, arch) = if target.contains(\"linux\") && target.contains(\"x86_64\") {\n    (\"linux\", \"x86_64\")\n  } else if target.contains(\"linux\") && target.contains(\"aarch64\") {\n    (\"linux\", \"aarch64\")\n  } else if target.contains(\"apple\") && target.contains(\"x86_64\") {\n    (\"macos\", \"x86_64\")\n  } else if target.contains(\"apple\") && target.contains(\"aarch64\") {\n    (\"macos\", \"aarch64\")\n  } else if target.contains(\"windows\") && target.contains(\"x86_64\") {\n    (\"windows\", \"x86_64\")\n  } else if target.contains(\"windows\") && target.contains(\"aarch64\") {\n    (\"windows\", \"aarch64\")\n  } else {\n    bail!(\"Unsupported platform for PR builds: {}\", target)\n  };\n\n  // Prefer release builds, fall back to debug\n  Ok(format!(\"release-{os}-{arch}-deno\"))\n}\n\nfn get_pr_debug_artifact_name() -> Result<String, AnyError> {\n  let release_name = get_pr_artifact_name()?;\n  Ok(release_name.replacen(\"release-\", \"debug-\", 1))\n}\n\nfn upgrade_from_pr(\n  pr_number: u64,\n  upgrade_flags: &UpgradeFlags,\n) -> Result<(), AnyError> {\n  // Check that `gh` CLI is available\n  let gh_version = Command::new(\"gh\").arg(\"--version\").output();\n  if gh_version.is_err() {","sourceCodeStart":579,"sourceCodeEnd":615,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/tools/upgrade.rs#L579-L615","documentation":"When installing Deno from a PR or branch (`deno upgrade --pr` / branch flow), Deno maps the current Rust target triple to a CI artifact name. Only linux/macOS/windows on x86_64/aarch64 are recognized; anything else falls through to this bail. The artifact name is used to find the GitHub Actions build to download.","triggerScenarios":"Running `deno upgrade --pr <n>` (or the branch equivalent) on a host whose target triple matches none of the six supported combinations, e.g. linux riscv64, windows arm32, or an unusual/renamed triple string that does not contain the expected os/arch substrings checked in get_pr_artifact_name.","commonSituations":"Building/running Deno on niche architectures or musl variants that report unexpected triples; cross-compilation environments where the detected target differs from the real host; CI containers with custom toolchain targets.","solutions":["Run the upgrade on one of the supported platforms: linux or macOS (x86_64/aarch64), or windows x86_64/aarch64.","If you are on an unsupported platform, download and build from source for that target instead of using PR artifacts.","Check what target your environment reports (e.g. `rustc -vV` / `deno -V` build info) and rule out a misdetected triple.","For linux non-x86_64, note PR release artifacts are typically only published for linux-x86_64; use the debug artifact or build locally."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"case \"$(uname -s)/$(uname -m)\" in\n  Linux/x86_64|Linux/aarch64|Darwin/x86_64|Darwin/arm64|MINGW*/x86_64) echo ok ;;\n  *) echo \"unsupported for PR artifacts; build from source\"; exit 1 ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check your os/arch against the six supported combos before using PR/branch installs.","On exotic platforms, script a from-source build instead of artifact download.","Remember PR release artifacts are linux-x86_64 only; everything else is debug."],"tags":["upgrade","platform","ci-artifacts","pr-build","architecture"],"backgroundTag":"unsupported-platform","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}