{"record":{"id":"7f43e02fe2bfb42a","repo":"dotnet/runtime","slug":"unknown-os-7f43e0","errorCode":null,"errorMessage":"Unknown OS.","messagePattern":"Unknown OS\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":3902,"sourceCode":"    return None\n\n\ndef determine_superpmi_tool_name(coreclr_args):\n    \"\"\" Determine the superpmi tool name based on the OS\n\n    Args:\n        coreclr_args (CoreclrArguments): parsed args\n\n    Return:\n        (str) Name of the superpmi tool to use\n    \"\"\"\n\n    if coreclr_args.host_os == \"osx\" or coreclr_args.host_os == \"linux\":\n        return \"superpmi\"\n    elif coreclr_args.host_os == \"windows\":\n        return \"superpmi.exe\"\n    else:\n        raise RuntimeError(\"Unknown OS.\")\n\n\ndef determine_superpmi_tool_path(coreclr_args):\n    \"\"\" Determine the superpmi tool full path\n\n    Args:\n        coreclr_args (CoreclrArguments): parsed args\n\n    Return:\n        (str) Path of the superpmi tool to use\n    \"\"\"\n\n    superpmi_tool_name = determine_superpmi_tool_name(coreclr_args)\n    return find_tool(coreclr_args, superpmi_tool_name)\n\n\ndef determine_mcs_tool_name(coreclr_args):\n    \"\"\" Determine the mcs tool name based on the OS","sourceCodeStart":3884,"sourceCodeEnd":3920,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi.py#L3884-L3920","documentation":"Raised in `determine_superpmi_tool_name` (superpmi.py:3901-3902) when host_os is not osx, linux, or windows. The superpmi binary name (superpmi / superpmi.exe) is only defined for those three; any other host_os has no known superpmi executable name.","triggerScenarios":"coreclr_args.host_os resolves to a value outside {osx, linux, windows} (e.g. freebsd, illumos, browser, wasi) and a flow needs the superpmi tool name. The OS switch has no case for other platforms.","commonSituations":"Explicitly setting host/target OS to an unsupported platform; running on an OS where superpmi is not built; cross-compiling to browser/wasi/android targets while invoking superpmi on the host.","solutions":["Run on a supported host OS (linux, osx, windows) where superpmi is built.","Do not override host_os to an unsupported value; allow auto-detection.","If cross-targeting, keep host_os as the supported build host and only set target_os."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"supported = {'osx', 'linux', 'windows'}\nif coreclr_args.host_os not in supported:\n    raise SystemExit(f'superpmi tool only defined for {sorted(supported)}; got {coreclr_args.host_os}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run on linux/osx/windows where superpmi is built.","Let host_os auto-detect rather than overriding it."],"tags":["os","tooling","superpmi"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}