Commit 11888551 authored by Adam Kallai's avatar Adam Kallai Committed by Commit Bot

Improve VS toolchain search

Observed that sometimes a VS2017 and a VS2019 directory are present, but
the VS2019 directory is empty (probably because VS2019 was installed then
uninstalled). In this case we should not identify VS2019 as a valid
installation.

Bug: None
Change-Id: I517cf3debc430e949529d06cd5cb281477d5281a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871990Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709507}
parent ae745d80
......@@ -159,7 +159,8 @@ def GetVisualStudioVersion():
os.environ.get('vs%s_install' % version),
os.path.expandvars('%ProgramFiles(x86)%' +
'/Microsoft Visual Studio/%s' % version)):
if path and os.path.exists(path):
if path and any(os.path.exists(os.path.join(path, edition)) for edition in
('Enterprise', 'Professional', 'Community', 'Preview')):
available_versions.append(version)
break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment