janhoy commented on code in PR #4271:
URL: https://github.com/apache/solr/pull/4271#discussion_r3248388150
##########
solr/core/src/java/org/apache/solr/cli/DeleteTool.java:
##########
@@ -42,7 +42,20 @@
name = "delete",
mixinStandardHelpOptions = true,
description =
- "Deletes a collection or core depending on whether Solr is running in
SolrCloud or standalone mode.")
+ "Deletes a collection or core depending on whether Solr is running in
SolrCloud or standalone mode.",
+ exitCodeListHeading = "%nExit Codes:%n",
+ exitCodeList = {
+ "0:Collection or core deleted successfully.",
+ "1:Failed to delete; collection or core may not exist, or Solr may not
be running."
Review Comment:
Absolutely. Made me think about return codes a bit as well. Such as for
`solr stop`. It will actually return 1 (failure) if solr was not already
running. But perhaps it should be differentiated to returning
* 0 if solr was running and successfully stopped
* 1 if solr was not running
* 2 if there was a syntax error in the command
* 3 if solr was running but we could not stop it
This is out of scope for this PR, but I'd love it if documenting exit codes
in picocli would lead to other PRs to clean up in our exit code behavior...
--
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]