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 11:01:00 UTC

lucene-solr:branch_6x: SOLR-9151: Fix SolrCLI so that bin/solr -e cloud example can be run from any CWD (cherry picked from commit 50c4f58)

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x d6264eb47 -> 41c311269


SOLR-9151: Fix SolrCLI so that bin/solr -e cloud example can be run from any CWD
(cherry picked from commit 50c4f58)


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

Branch: refs/heads/branch_6x
Commit: 41c311269318986dacbebba8ef5bfa9d1d69adaa
Parents: d6264eb
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:57:49 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/41c31126/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 40eff19..945b9fc 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -203,6 +203,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/41c31126/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 46532a1..4350a47 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrCLI.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
@@ -2494,7 +2494,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 =