Fix "meson compile" not activating vsenv

setup_vsenv() was not propagating the return value, so build.need_vsenv
was always False.
This commit is contained in:
Xavier Claessens 2021-10-28 11:13:10 -04:00 committed by Xavier Claessens
parent ec161fca4d
commit 37ea997ca4
1 changed files with 3 additions and 2 deletions

View File

@ -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