You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2016/05/24 10:56:50 UTC

lucene-solr:master: SOLR-9151: Fix SolrCLI so that bin/solr -e cloud example can be run from any CWD

Repository: lucene-solr
Updated Branches:
  refs/heads/master e44509f2d -> 50c4f5827


SOLR-9151: Fix SolrCLI so that bin/solr -e cloud example can be run from any CWD


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/50c4f582
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/50c4f582
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/50c4f582

Branch: refs/heads/master
Commit: 50c4f58276fa9da6d06a53af6b2e30e3877a33d5
Parents: e44509f
Author: Jan H�ydahl <ja...@apache.org>
Authored: Tue May 24 12:56:31 2016 +0200
Committer: Jan H�ydahl <ja...@apache.org>
Committed: Tue May 24 12:56:31 2016 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                     | 2 ++
 solr/core/src/java/org/apache/solr/util/SolrCLI.java | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/50c4f582/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f52dc9b..437c48c 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.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/50c4f582/solr/core/src/java/org/apache/solr/util/SolrCLI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/SolrCLI.java b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
index 1327484..9bc986b 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 =