catch malformed command line array option with helpful error
fixes
@@ -180,7 +180,10 @@ class UserArrayOption(UserOption[List[str]]):
if isinstance(value, str):
if value.startswith('['):
+ try:
newvalue = ast.literal_eval(value)
+ except ValueError:
+ raise MesonException('malformed option {}'.format(value))
elif value == '':
newvalue = []
else:
