From 3337120f791f4cdca89304c402c751f97aedb510 Mon Sep 17 00:00:00 2001 From: Alex Lisi Date: Thu, 15 Jan 2026 05:47:47 -0800 Subject: [PATCH] Fix: Quote cc_path to handle spaces in microcontroller names (#5351) Wraps self.cc_path in quotes when building the toolchain defines extraction command. This fixes the issue where microcontroller names containing spaces (e.g., 'Feather M0') would cause the command to be split incorrectly. Fixes #4894 --- platformio/check/tools/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/check/tools/base.py b/platformio/check/tools/base.py index ccf331f4..b32b2e3f 100644 --- a/platformio/check/tools/base.py +++ b/platformio/check/tools/base.py @@ -90,7 +90,7 @@ class CheckToolBase: # pylint: disable=too-many-instance-attributes def _extract_defines(language, includes_file): build_flags = self.cxx_flags if language == "c++" else self.cc_flags defines = [] - cmd = "echo | %s -x %s %s %s -dM -E -" % ( + cmd = 'echo | "%s" -x %s %s %s -dM -E -' % ( self.cc_path, language, " ".join(