You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by md...@apache.org on 2022/03/04 19:52:25 UTC

[solr] branch branch_9_0 updated: SOLR-15993 Use empty string test for older bash

This is an automated email from the ASF dual-hosted git repository.

mdrob pushed a commit to branch branch_9_0
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9_0 by this push:
     new 851179e  SOLR-15993 Use empty string test for older bash
851179e is described below

commit 851179e68f8cac59f2ead0bad8e59c52daf616c0
Author: Mike Drob <md...@apache.org>
AuthorDate: Fri Mar 4 13:41:30 2022 -0600

    SOLR-15993 Use empty string test for older bash
    
    (cherry picked from commit 9f791dbd05e91861eaf257628914a034009725ed)
---
 solr/bin/solr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/bin/solr b/solr/bin/solr
index 817e5c0..e0f0dc2 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -108,7 +108,7 @@ fi
 if [ -n "${SOLR_JAVA_HOME:-}" ]; then
   JAVA="$SOLR_JAVA_HOME/bin/java"
   JSTACK="$SOLR_JAVA_HOME/bin/jstack"
-elif [ -v JAVA_HOME ]; then
+elif [ -n "${JAVA_HOME:-}" ]; then
   for java in "$JAVA_HOME"/bin/amd64 "$JAVA_HOME"/bin; do
     if [ -x "$java/java" ]; then
       JAVA="$java/java"