rahulgoswami commented on code in PR #3347:
URL: https://github.com/apache/solr/pull/3347#discussion_r2101285379


##########
solr/core/src/java/org/apache/solr/cli/RunExampleTool.java:
##########
@@ -230,17 +230,13 @@ public void runImpl(CommandLine cli) throws Exception {
         throw new IllegalArgumentException(
             "Value of --script option is invalid! " + script + " not found");
     } else {
-      Path scriptFile = serverDir.getParent().resolve("bin").resolve("solr");
+      Path scriptFile =
+          serverDir.getParent().resolve("bin").resolve(CLIUtils.isWindows() ? 
"solr.cmd" : "solr");
       if (Files.isRegularFile(scriptFile)) {
         script = scriptFile.toAbsolutePath().toString();
       } else {
-        scriptFile = serverDir.getParent().resolve("bin").resolve("solr.cmd");
-        if (Files.isRegularFile(scriptFile)) {
-          script = scriptFile.toAbsolutePath().toString();
-        } else {
-          throw new IllegalArgumentException(
-              "Cannot locate the bin/solr script! Please pass --script to this 
application.");
-        }
+        throw new IllegalArgumentException(
+            "Cannot locate the bin/solr script! Please pass --script to this 
application.");

Review Comment:
   Resolved!



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to