Skip to content

Commit

Permalink
Forward port PR#2727
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Sep 29, 2024
1 parent eda5ec3 commit 9c44a47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions solr/core/src/java/org/apache/solr/cli/SolrCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ public static void main(String[] args) throws Exception {

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 -v or --version.");
args[0] = "version";
CLIO.out("Deprecated operation as of 9.8. Please use bin/solr --version.");
args = new String[] {"version"};
}
if (Arrays.asList("-v", "--version").contains(args[0])) {
// select the version tool to be run
args[0] = "version";
args = new String[] {"version"};
}
if (Arrays.asList(
"upconfig", "downconfig", "cp", "rm", "mv", "ls", "mkroot", "linkconfig", "updateacls")
Expand Down
4 changes: 2 additions & 2 deletions solr/packaging/test/test_version.bats
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ setup() {
@test "-version and version both return Solr version and deprecation" {
run solr -version
assert_output --partial "Solr version is:"
assert_output --partial "Deprecated operation as of 9.8. Please use -v or --version."
assert_output --partial "Deprecated operation as of 9.8. Please use bin/solr --version."

run solr version
assert_output --partial "Solr version is:"
assert_output --partial "Deprecated operation as of 9.8. Please use -v or --version."
assert_output --partial "Deprecated operation as of 9.8. Please use bin/solr --version."

}

0 comments on commit 9c44a47

Please sign in to comment.