Skip to content

Commit e19cc32

Browse files
linjaso1mergify[bot]
authored andcommitted
edksetup.sh: Fix the Issue of PYTHON_COMMAND Un-Configurable
- With the commit e6447d2 introduced, there do not have chance for caller to configure the PYTHON_COMMAND environment variable outside of this script. - All the configured value would be assigned into "python3" forcedly, without checking the environment variable is set or not. - This patch included the below changes, - Check the "PYTHON_COMMAND" is set or not before assigning the default value "python3" on it. - Rename the function naming into "SetupPythonCommand" to align its functionality. Signed-off-by: Jason1 Lin <[email protected]>
1 parent b734207 commit e19cc32

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

edksetup.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,22 @@ SetupEnv()
103103
fi
104104
}
105105

106-
SetupPython3()
106+
SetupPythonCommand()
107107
{
108+
#
109+
# If PYTHON_COMMAND is already set, then we can return right now
110+
#
111+
if [ -n "$PYTHON_COMMAND" ]
112+
then
113+
return 0
114+
fi
115+
108116
export PYTHON_COMMAND=python3
109117
}
110118

111119
SourceEnv()
112120
{
113-
SetupPython3
121+
SetupPythonCommand
114122
SetWorkspace
115123
SetupEnv
116124
}

0 commit comments

Comments
 (0)