janhoy commented on code in PR #2820:
URL: https://github.com/apache/solr/pull/2820#discussion_r1824575199


##########
solr/core/src/java/org/apache/solr/cli/SolrCLI.java:
##########
@@ -215,18 +150,16 @@ public static void exit(int exitStatus) {
   public static void main(String[] args) throws Exception {
     final boolean hasNoCommand =
         args == null || args.length == 0 || args[0] == null || 
args[0].trim().length() == 0;
-    final boolean isHelpCommand =
-        !hasNoCommand && Arrays.asList("-h", "--help", "/?").contains(args[0]);
+    final boolean isHelpCommand = !hasNoCommand && Arrays.asList("-h", 
"--help").contains(args[0]);
 
     if (hasNoCommand || isHelpCommand) {
       printHelp();
       exit(1);
     }
 
-    if (Arrays.asList("-version", "version").contains(args[0])) {
-      // select the version tool to be run
-      CLIO.out("Deprecated operation as of 9.8.  Please use bin/solr 
--version.");
-      args = new String[] {"version"};
+    if (args[0].equalsIgnoreCase("version")) {
+      CLIO.out("version is not a valid command!  Did you mean --version?\n");
+      exit(1);

Review Comment:
   I feel the `--version` flag should report the version of the local Solr CLI 
program, but if we implement a `version` cmd that accepts `--solr-url` then it 
should report the version of the remote solr host?



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