From 5c8ff63775a475510dc9fd555b99bdf0bf319d79 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 12 Apr 2020 15:54:28 -0700 Subject: If no vswhere.exe is found, do not try to run it. Was breaking tests on non-win32 --- src/engine/SCons/Tool/MSCommon/vc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 456ccae..58be07c 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -366,6 +366,9 @@ def find_vc_pdir_vswhere(msvc_version, env=None): else: vswhere_path = env.subst('$VSWHERE') + if vswhere_path is None: + return None + debug('find_vc_pdir_vswhere(): VSWHERE = %s'%vswhere_path) vswhere_cmd = [ vswhere_path, @@ -374,6 +377,8 @@ def find_vc_pdir_vswhere(msvc_version, env=None): "-property", "installationPath", ] + debug("find_vc_pdir_vswhere(): running: %s" % vswhere_cmd) + #cp = subprocess.run(vswhere_cmd, capture_output=True) # 3.7+ only cp = subprocess.run(vswhere_cmd, stdout=PIPE, stderr=PIPE) -- cgit v0.12