From 2355f0c09c52d6979f9f471b23816f3081cc946b Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Tue, 20 Sep 2022 05:39:10 +0800 Subject: [PATCH] BaseTools: Fix check for ${PYTHON_COMMAND} in Tests/GNUmakefile When checking if $PYTHON_COMMAND exists, curly braces should be used instead of parentheses. Also, "1" causes an error on FreeBSD: it's likely supposed to be 2>&1 like other scripts. Signed-off-by: Rebecca Cran Reviewed-by: Bob Feng --- BaseTools/Tests/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Tests/GNUmakefile b/BaseTools/Tests/GNUmakefile index 1cb77f84b1..caa4d26c9b 100644 --- a/BaseTools/Tests/GNUmakefile +++ b/BaseTools/Tests/GNUmakefile @@ -8,7 +8,7 @@ all: test test: - @if command -v $(PYTHON_COMMAND) >/dev/null 1; then $(PYTHON_COMMAND) RunTests.py; else python RunTests.py; fi + @if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi clean: find . -name '*.pyc' -exec rm '{}' ';' -- 2.39.2