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
This commit is contained in:
Alex Lisi
2026-01-15 05:47:47 -08:00
committed by GitHub
parent 5669185a8b
commit 3337120f79
+1 -1
View File
@@ -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(