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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user