|
@@ -759,19 +759,15 @@ public class PluginManager {
|
|
}
|
|
}
|
|
|
|
|
|
if (isOfficialPlugin(repo, user, version)) {
|
|
if (isOfficialPlugin(repo, user, version)) {
|
|
- return new PluginHandle(repo, Version.CURRENT.number(), null, repo);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (repo.startsWith("elasticsearch-")) {
|
|
|
|
- // remove elasticsearch- prefix
|
|
|
|
- String endname = repo.substring("elasticsearch-".length());
|
|
|
|
- return new PluginHandle(endname, version, user, repo);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (name.startsWith("es-")) {
|
|
|
|
- // remove es- prefix
|
|
|
|
- String endname = repo.substring("es-".length());
|
|
|
|
- return new PluginHandle(endname, version, user, repo);
|
|
|
|
|
|
+ String endname = repo;
|
|
|
|
+ if (repo.startsWith("elasticsearch-")) {
|
|
|
|
+ // remove elasticsearch- prefix
|
|
|
|
+ endname = repo.substring("elasticsearch-".length());
|
|
|
|
+ } else if (name.startsWith("es-")) {
|
|
|
|
+ // remove es- prefix
|
|
|
|
+ endname = repo.substring("es-".length());
|
|
|
|
+ }
|
|
|
|
+ return new PluginHandle(endname, Version.CURRENT.number(), null, repo);
|
|
}
|
|
}
|
|
|
|
|
|
return new PluginHandle(repo, version, user, repo);
|
|
return new PluginHandle(repo, version, user, repo);
|