X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2Fbuild%2Fbuild.py;fp=BaseTools%2FSource%2FPython%2Fbuild%2Fbuild.py;h=bec848a7b2e3e8a019581e7c8f943e9fcda7cc84;hp=d841fefdc502b1ff9e494d6e64aa8b2ae7aa6751;hb=8c944c938359cffda4c889259b3d2aba69e9ee7b;hpb=f34c7645bd87c61f72c2bc4a8f88afabc69de512 diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index d841fefdc5..bec848a7b2 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2347,7 +2347,7 @@ class Build(): toolName = split[3] path = '_'.join(split[0:4]) + '_PATH' path = self.ToolDef.ToolsDefTxtDictionary[path] - path = self.GetFullPathOfTool(path) + path = self.GetRealPathOfTool(path) guidAttribs.append((guid, toolName, path)) # Write out GuidedSecTools.txt @@ -2357,21 +2357,11 @@ class Build(): print(' '.join(guidedSectionTool), file=toolsFile) toolsFile.close() - ## Returns the full path of the tool. + ## Returns the real path of the tool. # - def GetFullPathOfTool (self, tool): + def GetRealPathOfTool (self, tool): if os.path.exists(tool): return os.path.realpath(tool) - else: - # We need to search for the tool using the - # PATH environment variable. - for dirInPath in os.environ['PATH'].split(os.pathsep): - foundPath = os.path.join(dirInPath, tool) - if os.path.exists(foundPath): - return os.path.realpath(foundPath) - - # If the tool was not found in the path then we just return - # the input tool. return tool ## Launch the module or platform build