Fix "meson compile" not activating vsenv

setup_vsenv() was not propagating the return value, so build.need_vsenv
was always False.
pull/9489/head
Xavier Claessens 3 years ago committed by Xavier Claessens
parent ec161fca4d
commit 37ea997ca4
  1. 5
      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

Loading…
Cancel
Save