diff options
-rw-r--r-- | mesonbuild/interpreterbase/interpreterbase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/interpreterbase/interpreterbase.py b/mesonbuild/interpreterbase/interpreterbase.py index 4930bee..3b23e19 100644 --- a/mesonbuild/interpreterbase/interpreterbase.py +++ b/mesonbuild/interpreterbase/interpreterbase.py @@ -127,7 +127,10 @@ class InterpreterBase: found = p for parent in p.parents: if (parent / 'meson.build').is_file(): - found = parent + with open(parent / 'meson.build', encoding='utf-8') as f: + if f.readline().startswith('project('): + found = parent + break else: break |