BaseTools/build.py: language cleanup around CheckEnvVariable

The function CheckEnvVariable in fact checks several environment
variables. And the comment at its invocation enumerates a specific set of
variables, which defeats half the point of abstracting it out into a
helper function.

Rename the function to the plural form and turn the comment into a list
of examples.

Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
This commit is contained in:
Leif Lindholm 2025-07-03 18:30:43 +01:00 committed by mergify[bot]
parent 9e815d789b
commit 5ca97bf64f

View file

@ -82,7 +82,7 @@ TmpTableDict = {}
# If any of above environment variable is not set or has error, the build
# will be broken.
#
def CheckEnvVariable():
def CheckEnvVariables():
# check WORKSPACE
if "WORKSPACE" not in os.environ:
EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
@ -2615,9 +2615,9 @@ def Main():
ExtraData="Please select one of: %s" % (' '.join(gSupportedTarget)))
#
# Check environment variable: EDK_TOOLS_PATH, WORKSPACE, PATH
# Check environment variables: EDK_TOOLS_PATH, WORKSPACE, PATH, etc...
#
CheckEnvVariable()
CheckEnvVariables()
GlobalData.gCommandLineDefines.update(ParseDefines(Option.Macros))
Workspace = os.getenv("WORKSPACE")