From 7d4d25353c1e36a97959f44ed909f80f92b61744 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Fri, 13 Nov 2020 15:14:15 +0100 Subject: [PATCH] ninjabackend: fix matching of empty strings closes #7977 --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index daada12b2..1ed742b75 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -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)