File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 41
41
42
42
import org .apache .commons .compress .utils .IOUtils ;
43
43
import org .apache .commons .lang3 .StringUtils ;
44
+
45
+ import com .github .zafarkhaja .semver .Version ;
46
+
44
47
import processing .app .debug .TargetBoard ;
45
48
import processing .app .debug .TargetPackage ;
46
49
import processing .app .debug .TargetPlatform ;
@@ -304,8 +307,9 @@ public Base(String[] args) throws Exception {
304
307
String [] boardToInstallParts = parser .getBoardToInstall ().split (":" );
305
308
306
309
ContributedPlatform selected = null ;
307
- if (boardToInstallParts .length == 3 ) {
308
- selected = indexer .getIndex ().findPlatform (boardToInstallParts [0 ], boardToInstallParts [1 ], VersionHelper .valueOf (boardToInstallParts [2 ]).toString ());
310
+ if (boardToInstallParts .length == 3 && VersionHelper .valueOf (boardToInstallParts [2 ]).isPresent ()) {
311
+ Version vs = VersionHelper .valueOf (boardToInstallParts [2 ]).get ();
312
+ selected = indexer .getIndex ().findPlatform (boardToInstallParts [0 ], boardToInstallParts [1 ], vs .toString ());
309
313
} else if (boardToInstallParts .length == 2 ) {
310
314
List <ContributedPlatform > platformsByName = indexer .getIndex ().findPlatforms (boardToInstallParts [0 ], boardToInstallParts [1 ]);
311
315
Collections .sort (platformsByName , new DownloadableContributionVersionComparator ());
You can’t perform that action at this time.
0 commit comments