mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 18:54:14 +01:00
fix qouted string
This commit is contained in:
parent
208969aca7
commit
ff97ba9bb3
1 changed files with 7 additions and 2 deletions
|
@ -180,9 +180,14 @@ CONFIG_NEWLIB_LIBC=y
|
||||||
|
|
||||||
def extract_include_paths(command):
|
def extract_include_paths(command):
|
||||||
include_paths = []
|
include_paths = []
|
||||||
include_pattern = re.compile(r"(-I|-isystem)\s*([^\s]+)")
|
include_pattern = re.compile(
|
||||||
|
r'("-I\s*[^"]+)|(-isystem\s*[^\s]+)|(-I\s*[^\s]+)'
|
||||||
|
)
|
||||||
for match in include_pattern.findall(command):
|
for match in include_pattern.findall(command):
|
||||||
include_paths.append(match[1])
|
split_strings = re.split(
|
||||||
|
r"\s*-\s*(?:I|isystem)", list(filter(lambda x: x, match))[0]
|
||||||
|
)
|
||||||
|
include_paths.append(split_strings[1])
|
||||||
return include_paths
|
return include_paths
|
||||||
|
|
||||||
def extract_defines(command):
|
def extract_defines(command):
|
||||||
|
|
Loading…
Reference in a new issue