ninjabackend: fix matching of empty strings

closes #7977
This commit is contained in:
Alexander Neumann 2020-11-13 15:14:15 +01:00 committed by Jussi Pakkanen
parent aeb995fdc6
commit 7d4d25353c
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ class NinjaRule:
# expand variables in command
command = ' '.join([self._quoter(x) for x in self.command + self.args])
estimate = len(command)
for m in re.finditer(r'(\${\w*}|\$\w*)?[^$]*', command):
for m in re.finditer(r'(\${\w+}|\$\w+)?[^$]*', command):
if m.start(1) != -1:
estimate -= m.end(1) - m.start(1) + 1
chunk = m.group(1)