epugh commented on code in PR #4320:
URL: https://github.com/apache/solr/pull/4320#discussion_r3334263788


##########
solr/core/src/java/org/apache/solr/cli/CreateTool.java:
##########
@@ -226,8 +231,10 @@ protected void createCollection(CloudSolrClient 
cloudSolrClient, CommandLine cli
           "No live nodes found! Cannot create a collection until "
               + "there is at least 1 live node in the cluster.");
 
-    String solrUrl = cli.getOptionValue(CommonCLIOptions.SOLR_URL_OPTION);
-    if (solrUrl == null) {
+    String solrUrl;
+    if (CLIUtils.hasConnectionOption(cli)) {
+      solrUrl = CLIUtils.normalizeSolrUrl(cli);
+    } else {
       String firstLiveNode = liveNodes.iterator().next();
       solrUrl = 
ZkStateReader.from(cloudSolrClient).getBaseUrlForNodeName(firstLiveNode);

Review Comment:
   also, I did testing and it worked great.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to