malliaridis commented on code in PR #2820:
URL: https://github.com/apache/solr/pull/2820#discussion_r1824945975
##########
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...
I like this idea, especially if it comes to multiple Solr clusters /
instances, this would probably be helpful. But I think this is more of a
command we may introduce in the future.
If I remember correct, we also discussed the command `solr version` and
decided to drop support, rather than implement functionality under this command
for supporting urls as well.
--
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]