Skip to content

Commit 1a223c4

Browse files
committed
Update ARM64-detection on Macs
1 parent c6a10fa commit 1a223c4

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

seleniumbase/console_scripts/sb_install.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ def main(override=None, intel_for_uc=None):
230230
invalid_run_command()
231231
if "darwin" in sys_plat:
232232
if (
233-
"arm" in platform.processor().lower()
233+
(
234+
"arm" in platform.processor().lower()
235+
or "arm64" in platform.version().lower()
236+
)
234237
and not intel_for_uc
235238
and int(use_version.split(".")[0]) > 105
236239
):
@@ -401,7 +404,10 @@ def main(override=None, intel_for_uc=None):
401404
suffix = "WINDOWS"
402405
elif "darwin" in sys_plat:
403406
if (
404-
"arm" in platform.processor().lower()
407+
(
408+
"arm" in platform.processor().lower()
409+
or "arm64" in platform.version().lower()
410+
)
405411
and int(use_version.split(".")[0]) > 104
406412
):
407413
file_name = "edgedriver_mac64_m1.zip"
@@ -647,7 +653,10 @@ def main(override=None, intel_for_uc=None):
647653
if (
648654
intel_for_uc
649655
and "darwin" in sys_plat
650-
and "arm" in platform.processor().lower()
656+
and (
657+
"arm" in platform.processor().lower()
658+
or "arm64" in platform.version().lower()
659+
)
651660
):
652661
f_name = "uc_driver"
653662
new_file = os.path.join(downloads_folder, f_name)

seleniumbase/core/browser_launcher.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@
5151
PROXY_DIR_LOCK = proxy_helper.PROXY_DIR_LOCK
5252
PLATFORM = sys.platform
5353
IS_ARM_MAC = False
54-
if PLATFORM.endswith("darwin") and "arm" in platform.processor().lower():
54+
if (
55+
PLATFORM.endswith("darwin")
56+
and (
57+
"arm" in platform.processor().lower()
58+
or "arm64" in platform.version().lower()
59+
)
60+
):
5561
IS_ARM_MAC = True
5662
IS_WINDOWS = False
5763
LOCAL_CHROMEDRIVER = None

0 commit comments

Comments
 (0)