diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-10-16 17:34:59 -0400 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-10-17 13:02:23 +0530 |
| commit | 746c4eff48a2256faf428918198dc83d75b58206 (patch) | |
| tree | 19fea9ae68e7e4535e8f0e48d3d4698d32d9fa7b | |
| parent | 5fcf3476614a971079b43866c1ba8830ac15ba8c (diff) | |
| download | meson-746c4eff48a2256faf428918198dc83d75b58206.tar.gz | |
msubprojects: Fix crash if wrapdb_version is in bad format
Fixes: #12378
| -rwxr-xr-x | mesonbuild/msubprojects.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index 874364e18..6b107c063 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -155,6 +155,11 @@ class Runner: 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. |
