]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Tests: Use quotes around PYTHON_COMMAND
authorArd Biesheuvel <ardb@kernel.org>
Mon, 24 Oct 2022 06:11:22 +0000 (08:11 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 24 Oct 2022 13:04:40 +0000 (13:04 +0000)
Commit ("2355f0c09c52 BaseTools: Fix check for ${PYTHON_COMMAND} in
Tests/GNUmakefile") fixed a latent issue in the BaseTools/Tests
Makefile, but inadvertently broke the BaseTools build for cases where
PYTHON_COMMAND is not set. As it turns out, running 'command' without a
command argument makes the invocation succeed, causing the empty
variable to be evaluated and called later.

Let's put double quotes around PYTHON_COMMAND in the invocation of
'command' and force it to fail when PYTHON_COMMAND is not set.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Tests/GNUmakefile

index caa4d26c9ba6cb70d9ad395c1ad67b267a09b6d5..20b387864f74e6df09611b5ad2170b0f23d869e1 100644 (file)
@@ -8,7 +8,7 @@
 all: test\r
 \r
 test:\r
-       @if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi\r
+       @if command -v "${PYTHON_COMMAND}" >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi\r
 \r
 clean:\r
        find . -name '*.pyc' -exec rm '{}' ';'\r