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


##########
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 think at that point, I might suggest we introduce a `bin/solr inspect` 
command..   that could be then used to do lots of interesting things...    
   
   so we don't end up with `bin/solr --version` and `bin/solr version -s 
http://mycorp.dev.solr:234525` ;-)
   



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