{"record":{"id":"4078fbde7d79f438","repo":"oven-sh/bun","slug":"unsupported-operating-system-string","errorCode":null,"errorMessage":"Unsupported operating system: ${string}","messagePattern":"Unsupported operating system: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/utils.mjs","lineNumber":1372,"sourceCode":"\n/**\n * @param {string} string\n * @returns {\"darwin\" | \"linux\" | \"windows\" | \"freebsd\"}\n */\nexport function parseOs(string) {\n  if (/darwin|apple|mac/i.test(string)) {\n    return \"darwin\";\n  }\n  if (/linux|android/i.test(string)) {\n    return \"linux\";\n  }\n  if (/freebsd/i.test(string)) {\n    return \"freebsd\";\n  }\n  if (/win/i.test(string)) {\n    return \"windows\";\n  }\n  throw new Error(`Unsupported operating system: ${string}`);\n}\n\n/**\n * @returns {\"darwin\" | \"linux\" | \"windows\" | \"freebsd\"}\n */\nexport function getOs() {\n  return parseOs(process.platform);\n}\n\n/**\n * @param {string} string\n * @returns {\"x64\" | \"aarch64\"}\n */\nexport function parseArch(string) {\n  if (/x64|amd64|x86_64/i.test(string)) {\n    return \"x64\";\n  }\n  if (/arm64|aarch64/i.test(string)) {","sourceCodeStart":1354,"sourceCodeEnd":1390,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/utils.mjs#L1354-L1390","documentation":"Error \"Unsupported operating system: ${string}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/utils.mjs:1372 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}