From 54be450c4aad8be812d21294e06548ae8dedd90f Mon Sep 17 00:00:00 2001 From: Marek Fiala Date: Wed, 21 Feb 2024 13:59:09 +0100 Subject: [PATCH] feat(tools): detect linux platform only on linux systems Closes https://github.com/espressif/esp-idf/issues/13148 --- tools/idf_tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/idf_tools.py b/tools/idf_tools.py index 3bb6730340..796d5c5670 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -311,7 +311,8 @@ class Platforms: if platform_alias == 'any' and CURRENT_PLATFORM: platform_alias = CURRENT_PLATFORM platform_name = Platforms.PLATFORM_FROM_NAME.get(platform_alias, None) - platform_name = Platforms.detect_linux_arm_platform(platform_name) + if sys.platform == 'linux': + platform_name = Platforms.detect_linux_arm_platform(platform_name) if not platform_name: raise ValueError(f'Support for platform \'{platform_alias}\' hasn\'t been added yet.')