From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 15 Jul 2019 18:53:56 -0700 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18CA23082129; Tue, 16 Jul 2019 01:53:56 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69B685D968; Tue, 16 Jul 2019 01:53:54 +0000 (UTC) Subject: Re: [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements From: "Laszlo Ersek" To: Rebecca Cran , devel@edk2.groups.io, bob.c.feng@intel.com, liming.gao@intel.com, leif.lindholm@linaro.org, michael.d.kinney@intel.com, afish@apple.com References: <20190715222516.53254-1-rebecca@bsdio.com> <20190715222516.53254-6-rebecca@bsdio.com> Message-ID: Date: Tue, 16 Jul 2019 03:53:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 16 Jul 2019 01:53:56 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/16/19 03:47, Laszlo Ersek wrote: > On 07/16/19 00:25, Rebecca Cran wrote: >> Signed-off-by: Rebecca Cran >> --- >> edksetup.sh | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/edksetup.sh b/edksetup.sh >> index e2f116f8bc..ba055d5d5a 100755 >> --- a/edksetup.sh >> +++ b/edksetup.sh >> @@ -118,7 +118,7 @@ function SetupPython3() >> >> function SetupPython() >> { >> - if [ $PYTHON_COMMAND ] && [ -z $PYTHON3_ENABLE ];then >> + if [ -n "$PYTHON_COMMAND" ] && [ -z "$PYTHON3_ENABLE" ];then >> if ( command -v $PYTHON_COMMAND >/dev/null 2>&1 );then >> return 0 >> else >> @@ -127,7 +127,7 @@ function SetupPython() >> fi >> fi >> >> - if [ $PYTHON3_ENABLE ] && [ $PYTHON3_ENABLE == TRUE ] >> + if [ "$PYTHON3_ENABLE" == "TRUE" ] >> then >> SetupPython3 >> fi >> > > This patch looks sane, but I don't understand why it stops here. There > are more variable references that could be quoted; for example, just > after the above, we have: > > if [ $PYTHON3_ENABLE ] && [ $PYTHON3_ENABLE != TRUE ] Ah wait, that code is removed in patch #5. But, I think the question stands; there's more that could be quoted. What is the reason for quoting just these? Thanks Laszlo