Skip to content

Commit

Permalink
Update edk2-pytool-library (#237)
Browse files Browse the repository at this point in the history
edk2-pytool-library v0.13.0 introduces a breaking change to the function
FindWithVsWhere, affecting the WindowsVsToolChain plugin. This commit
upgrades edk2-pytool-library and performs necessary integration steps.

Signed-off-by: Joey Vagedes <joeyvagedes@microsoft.com>
  • Loading branch information
Javagedes authored and kenlautner committed May 9, 2023
1 parent bf1d105 commit 44499d8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,17 @@ def _get_vs_install_path(self, vs_version, varname):

if(path is None):
# Not specified...find latest
(rc, path) = FindWithVsWhere(vs_version=vs_version)
if rc == 0 and path is not None and os.path.exists(path):
try:
path = FindWithVsWhere(vs_version=vs_version)
except (EnvironmentError, ValueError, RuntimeError) as e:
self.Logger.error(str(e))
return None

if path is not None and os.path.exists(path):
self.Logger.debug("Found VS instance for %s", vs_version)
else:
self.Logger.error(
"Failed to find VS instance with VsWhere (%d)" % rc)
f"VsWhere successfully executed, but could not find VS instance for {vs_version}.")
return path

def _get_vc_version(self, path, varname):
Expand Down

0 comments on commit 44499d8

Please sign in to comment.