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


##########
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:
   so this is a bit of a werid one, which is right now `bin/solr version` works 
the same as `bin/solr --version`...    Should we keep the check and just give 
the same stock error message that we do if you do `bin/solr fakecommand`, which 
would be "fakecommand is not a valid command!"???



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