You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/03/04 17:08:01 UTC

[GitHub] [solr] cpoerschke commented on a change in pull request #619: SOLR-11749 Several test changes

cpoerschke commented on a change in pull request #619:
URL: https://github.com/apache/solr/pull/619#discussion_r819749140



##########
File path: solr/bin/solr
##########
@@ -99,14 +102,13 @@ elif [ -r "$SOLR_INCLUDE" ]; then
   . "$SOLR_INCLUDE"
 fi
 
-if [ -z "$SOLR_PID_DIR" ]; then
-  SOLR_PID_DIR="$SOLR_TIP/bin"
-fi
+# if pid dir is unset, deafult to $solr_tip/bin
+: ${SOLR_PID_DIR:=$SOLR_TIP/bin}
 
-if [ -n "$SOLR_JAVA_HOME" ]; then
+if [ -n "${SOLR_JAVA_HOME:-}" ]; then
   JAVA="$SOLR_JAVA_HOME/bin/java"
   JSTACK="$SOLR_JAVA_HOME/bin/jstack"
-elif [ -n "$JAVA_HOME" ]; then
+elif [ -v JAVA_HOME ]; then

Review comment:
       This gives `[: -v: unary operator expected` for older versions of bash.
   
   Could `-n "${JAVA_HOME:-}"` be used instead, consistent with the `SOLR_JAVA_HOME` check a few lines above?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org