aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/coredata.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 20fe750..bb1d277 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -180,7 +180,10 @@ class UserArrayOption(UserOption[List[str]]):
if isinstance(value, str):
if value.startswith('['):
- newvalue = ast.literal_eval(value)
+ try:
+ newvalue = ast.literal_eval(value)
+ except ValueError:
+ raise MesonException('malformed option {}'.format(value))
elif value == '':
newvalue = []
else: