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

This commit is contained in:
Jan Høydahl 2016-05-24 12:56:31 +02:00
parent e44509f2df
commit 50c4f58276
2 changed files with 3 additions and 1 deletions

View File

@ -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.

View File

@ -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 =