diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-10-28 11:13:10 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-10-29 08:54:49 -0400 |
commit | 37ea997ca4e74360bfa31748c0e3b408b85591e3 (patch) | |
tree | 1fdb8f26e598938d5e1b896772c5d9ec05807c17 /mesonbuild/mesonlib | |
parent | ec161fca4dc0731a1cf9c6f1663d611a33e405d9 (diff) | |
download | meson-37ea997ca4e74360bfa31748c0e3b408b85591e3.zip meson-37ea997ca4e74360bfa31748c0e3b408b85591e3.tar.gz meson-37ea997ca4e74360bfa31748c0e3b408b85591e3.tar.bz2 |
Fix "meson compile" not activating vsenv
setup_vsenv() was not propagating the return value, so build.need_vsenv
was always False.
Diffstat (limited to 'mesonbuild/mesonlib')
-rw-r--r-- | mesonbuild/mesonlib/vsenv.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/mesonlib/vsenv.py b/mesonbuild/mesonlib/vsenv.py index 0d69d9a..2ba2b90 100644 --- a/mesonbuild/mesonlib/vsenv.py +++ b/mesonbuild/mesonlib/vsenv.py @@ -97,10 +97,11 @@ def _setup_vsenv(force: bool) -> bool: os.environ[k] = v return True -def setup_vsenv(force: bool = False): +def setup_vsenv(force: bool = False) -> bool: try: - _setup_vsenv(force) + return _setup_vsenv(force) except MesonException as e: if force: raise mlog.warning('Failed to activate VS environment:', str(e)) + return False |