{"record":{"id":"7c5a11b119dd8ebd","repo":"oven-sh/bun","slug":"unsupported-distro-distro","errorCode":null,"errorMessage":"Unsupported distro: ${distro}","messagePattern":"Unsupported distro: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/utils.mjs","lineNumber":1577,"sourceCode":" * @returns {string}\n */\nexport function getUsernameForDistro(distro) {\n  if (/windows/i.test(distro)) {\n    return \"administrator\";\n  }\n  if (/alpine|centos/i.test(distro)) {\n    return \"root\";\n  }\n  if (/debian/i.test(distro)) {\n    return \"admin\";\n  }\n  if (/ubuntu/i.test(distro)) {\n    return \"ubuntu\";\n  }\n  if (/amazon|amzn|al\\d+|rhel/i.test(distro)) {\n    return \"ec2-user\";\n  }\n  throw new Error(`Unsupported distro: ${distro}`);\n}\n\n/**\n * @returns {string | undefined}\n */\nexport function getDistro() {\n  if (isMacOS) {\n    return \"macOS\";\n  }\n\n  if (isLinux) {\n    const alpinePath = \"/etc/alpine-release\";\n    if (existsSync(alpinePath)) {\n      return \"alpine\";\n    }\n\n    const releasePath = \"/etc/os-release\";\n    if (existsSync(releasePath)) {","sourceCodeStart":1559,"sourceCodeEnd":1595,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/utils.mjs#L1559-L1595","documentation":"Thrown by getUsernameForDistro() when the distro string matches none of the known SSH-username mappings (windows→administrator, alpine/centos→root, debian→admin, ubuntu→ubuntu, amazon/rhel→ec2-user). A new or unrecognized CI image needs an entry added.","triggerScenarios":"Thrown at scripts/utils.mjs:1577 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported distros in the platform string","Add a username mapping for the new distro"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}