Apache Solr open-source search software
SOLR-9151: Fix SolrCLI so that bin/solr -e cloud example can be run from any CWD
Jan Høydahl50c4f58276fa
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex f52dc9bdaf8..437c48cebff 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -234,6 +234,8 @@ Bug Fixes* SOLR-9134: Fix RestManager.addManagedResource return value. (Christine Poerschke)+* SOLR-9151: Fix SolrCLI so that bin/solr -e cloud example can be run from any CWD (janhoy)+Optimizations----------------------* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.diff --git a/solr/core/src/java/org/apache/solr/util/SolrCLI.java b/solr/core/src/java/org/apache/solr/util/SolrCLI.javaindex 13274847157..9bc986b1c01 100644--- a/solr/core/src/java/org/apache/solr/util/SolrCLI.java+++ b/solr/core/src/java/org/apache/solr/util/SolrCLI.java@@ -2493,7 +2493,7 @@ public class SolrCLI {String solrHome = solrHomeDir.getAbsolutePath();// don't display a huge path for solr home if it is relative to the cwd- if (!isWindows && solrHome.startsWith(cwdPath))+ if (!isWindows && cwdPath.length() > 1 && solrHome.startsWith(cwdPath))solrHome = solrHome.substring(cwdPath.length()+1);String startCmd =