aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-02-05 11:44:24 +0200
committerDylan Baker <dylan@pnwbakers.com>2022-02-05 08:09:24 -0800
commitb497becc8744825a6943b13c5b8750403e29fc82 (patch)
tree64a710577e500afe463f469ff0c67ebebf8bc1cc /mesonbuild
parentdb680a78d11c45064281dbc5a158919323dda666 (diff)
downloadmeson-b497becc8744825a6943b13c5b8750403e29fc82.zip
meson-b497becc8744825a6943b13c5b8750403e29fc82.tar.gz
meson-b497becc8744825a6943b13c5b8750403e29fc82.tar.bz2
Guard against empty string in subdir().
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index c83d09e..d803fdb 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2082,6 +2082,8 @@ external dependencies (including libraries) must go to "dependencies".''')
raise InvalidArguments('Must not go into subprojects dir with subdir(), use subproject() instead.')
if self.subdir == '' and args[0].startswith('meson-'):
raise InvalidArguments('The "meson-" prefix is reserved and cannot be used for top-level subdir().')
+ if args[0] == '':
+ raise InvalidArguments("The argument given to subdir() is the empty string ''. This is prohibited.")
for i in kwargs['if_found']:
if not i.found():
return