oven-sh/bun · error
Unsupported distro
Error message
Unsupported distro: ${distro} What it means
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.
Solutions
- Use one of the supported distros in the platform string
- Add a username mapping for the new distro
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/utils.mjs:1577 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/7c5a11b119dd8ebd.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/utils.mjs:1577
* @returns {string}
*/
export function getUsernameForDistro(distro) {
if (/windows/i.test(distro)) {
return "administrator";
}
if (/alpine|centos/i.test(distro)) {
return "root";
}
if (/debian/i.test(distro)) {
return "admin";
}
if (/ubuntu/i.test(distro)) {
return "ubuntu";
}
if (/amazon|amzn|al\d+|rhel/i.test(distro)) {
return "ec2-user";
}
throw new Error(`Unsupported distro: ${distro}`);
}
/**
* @returns {string | undefined}
*/
export function getDistro() {
if (isMacOS) {
return "macOS";
}
if (isLinux) {
const alpinePath = "/etc/alpine-release";
if (existsSync(alpinePath)) {
return "alpine";
}
const releasePath = "/etc/os-release";
if (existsSync(releasePath)) {View on GitHub (pinned to 8c5296ac45)