Skip to content

Commit

Permalink
fix(cli): m1 check should not fail on windows machines (#3579)
Browse files Browse the repository at this point in the history
  • Loading branch information
swaroopjagadish authored Nov 16, 2021
1 parent baad024 commit 4b4c972
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion metadata-ingestion/src/datahub/cli/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import os
import pathlib
import platform
import subprocess
import sys
import tempfile
Expand Down Expand Up @@ -78,7 +79,13 @@ def check() -> None:

def is_m1() -> bool:
"""Check whether we are running on an M1 machine"""
return os.uname().machine == "arm64" and os.uname().sysname == "Darwin"
try:
return (
platform.uname().machine == "arm64" and platform.uname().system == "Darwin"
)
except Exception:
# Catch-all
return False


def should_use_neo4j_for_graph_service(graph_service_override: Optional[str]) -> bool:
Expand Down

0 comments on commit 4b4c972

Please sign in to comment.