Skip to content

Commit

Permalink
msubprojects: Fix crash if wrapdb_version is in bad format
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse authored and nirbheek committed Oct 17, 2023
1 parent 5fcf347 commit 746c4ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mesonbuild/msubprojects.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ def update_wrapdb(self) -> bool:
try:
wrapdb_version = self.wrap.get('wrapdb_version')
branch, revision = wrapdb_version.split('-', 1)
except ValueError:
if not options.force:
self.log(' ->', mlog.red('Malformed wrapdb_version field, use --force to update any way'))
return False
branch = revision = None
except WrapException:
# Fallback to parsing the patch URL to determine current version.
# This won't work for projects that have upstream Meson support.
Expand Down

0 comments on commit 746c4ef

Please sign in to comment.