allow manual override of system type (#4952)

* allow manual override of system type
https://community.platformio.org/t/windows-on-arm64-problem-installing-xtensa-toolchain/25497

* fix lint
This commit is contained in:
Chris
2024-08-29 10:28:52 +02:00
committed by GitHub
parent 44ef6e3469
commit f1726843a2

View File

@ -15,6 +15,7 @@
import datetime
import functools
import math
import os
import platform
import re
import shutil
@ -136,6 +137,11 @@ def singleton(cls):
def get_systype():
# allow manual override, eg. for
# windows on arm64 systems with emulated x86
if "PLATFORMIO_SYSTEM_TYPE" in os.environ:
return os.environ.get("PLATFORMIO_SYSTEM_TYPE")
system = platform.system().lower()
arch = platform.machine().lower()
if system == "windows":