diff options
-rw-r--r-- | mesonbuild/mesonlib/vsenv.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/mesonlib/vsenv.py b/mesonbuild/mesonlib/vsenv.py index 0d37765..4eab428 100644 --- a/mesonbuild/mesonlib/vsenv.py +++ b/mesonbuild/mesonlib/vsenv.py @@ -96,8 +96,13 @@ def _setup_vsenv(force: bool) -> bool: continue if not bat_line: continue - k, v = bat_line.split('=', 1) - os.environ[k] = v + try: + k, v = bat_line.split('=', 1) + except ValueError: + # there is no "=", ignore junk data + pass + else: + os.environ[k] = v return True def setup_vsenv(force: bool = False) -> bool: |