From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.16423.1666592202109746182 for ; Sun, 23 Oct 2022 23:16:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PQoxVe8z; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42C3161017; Mon, 24 Oct 2022 06:16:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48AE3C433B5; Mon, 24 Oct 2022 06:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666592200; bh=7f0t2BVPxlyx2scH9Czv6ynS9467yH4BuuXc/D3eTEs=; h=From:To:Cc:Subject:Date:From; b=PQoxVe8zvkXbRoPvob4Gv6rlwgXcfAaGZdMqoT6ZOPT30Pn7lWGp7ttkUkKbsTlUp gsUwzhk8Ad15Uk3x7PnYWgcM5Yb2JAxxJfXJbJD/IKdqitTYO839kOhRdVd1ByrYKH NosPwaQIGO2uCRTjfH3DeNPHeehU1k8Pfdv+Kx7ZzKAH7h36Bsc7LwfMAnwCE3Mq2h HqaqFyJ3Pv2KUqVQkOzU3AdwYloA4rkhQ04tg+eqjWYqDYgl6NrL3usa20SJOJMTke jusEDDlvRvnz17ActkDD378Frp1sd+Zb9whI8o7YdJAcmFpTTeSWJg4X/rciG/Az39 UAXFjK7K3PuCA== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: quic_llindhol@quicinc.com, gaoliming@byosoft.com.cn, bob.c.feng@intel.com, rebecca@bsdio.com, Ard Biesheuvel Subject: [PATCH] BaseTools/Tests: Use quotes around PYTHON_COMMAND Date: Mon, 24 Oct 2022 08:16:33 +0200 Message-Id: <20221024061633.105276-1-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- BaseTools/Tests/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Tests/GNUmakefile b/BaseTools/Tests/GNUmakefile index caa4d26c9ba6..20b387864f74 100644 --- a/BaseTools/Tests/GNUmakefile +++ b/BaseTools/Tests/GNUmakefile @@ -8,7 +8,7 @@ all: test=0D =0D test:=0D - @if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then ${PYTHON_COMMAND} = RunTests.py; else python RunTests.py; fi=0D + @if command -v "${PYTHON_COMMAND}" >/dev/null 2>&1; then ${PYTHON_COMMAND= } RunTests.py; else python RunTests.py; fi=0D =0D clean:=0D find . -name '*.pyc' -exec rm '{}' ';'=0D --=20 2.35.1