Skip to content

Commit

Permalink
fix: macOS platform detection
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Nov 14, 2023
1 parent ae7181c commit 96aa935
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ai/backend/install/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ async def detect_os(ctx: Context) -> OSInfo:
except IOError:
issue_output = b""
release_metadata = lsb_release_output + b"\n" + issue_output
if uname_s_output == "Darwin":
if uname_s_output == b"Darwin":
assert platform_kernel == "darwin"
platform_kernel = "macos"
distro = "Darwin"
elif (
Path("/etc/debian_version").exists()
Expand All @@ -70,7 +71,7 @@ async def detect_os(ctx: Context) -> OSInfo:
else:
raise RuntimeError(
"Unsupported host linux distribution: "
f"{uname_s_output.decode()}, {release_metadata.decode()}"
f"{uname_s_output.decode()!r}, {release_metadata.decode()!r}"
)
return OSInfo(
platform=Platform(f"{platform_kernel}-{platform_arch}").value, # type: ignore
Expand Down

0 comments on commit 96aa935

Please sign in to comment.