File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,16 @@ protected void onProgress(Progress progress) {
370
370
371
371
String [] libraryToInstallParts = parser .getLibraryToInstall ().split (":" );
372
372
373
- ContributedLibrary selected = indexer .getIndex ().find (libraryToInstallParts [0 ], VersionHelper .valueOf (libraryToInstallParts [1 ]).toString ());
373
+ ContributedLibrary selected =null ;
374
+ if (libraryToInstallParts .length == 2 ) {
375
+ selected = indexer .getIndex ().find (libraryToInstallParts [0 ], VersionHelper .valueOf (libraryToInstallParts [1 ]).toString ());
376
+ } else if (libraryToInstallParts .length == 1 ) {
377
+ List <ContributedLibrary > librariesByName = indexer .getIndex ().find (libraryToInstallParts [0 ]);
378
+ Collections .sort (librariesByName , new DownloadableContributionVersionComparator ());
379
+ if (!librariesByName .isEmpty ()) {
380
+ selected = librariesByName .get (librariesByName .size () - 1 );
381
+ }
382
+ }
374
383
if (selected == null ) {
375
384
System .out .println (_ ("Selected library is not available" ));
376
385
System .exit (1 );
You can’t perform that action at this time.
0 commit comments