Skip to content

Commit 6496038

Browse files
xclaessenirbheek
authored andcommitted
msubprojects: Fix crash if wrapdb_version is in bad format
Fixes: mesonbuild#12378
1 parent 639ed00 commit 6496038

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mesonbuild/msubprojects.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ def update_wrapdb(self) -> bool:
153153
try:
154154
wrapdb_version = self.wrap.get('wrapdb_version')
155155
branch, revision = wrapdb_version.split('-', 1)
156+
except ValueError:
157+
if not options.force:
158+
self.log(' ->', mlog.red('Malformed wrapdb_version field, use --force to update any way'))
159+
return False
160+
branch = revision = None
156161
except WrapException:
157162
# Fallback to parsing the patch URL to determine current version.
158163
# This won't work for projects that have upstream Meson support.

0 commit comments

Comments
 (0)