File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 4141
4242import org .apache .commons .compress .utils .IOUtils ;
4343import org .apache .commons .lang3 .StringUtils ;
44+
45+ import com .github .zafarkhaja .semver .Version ;
46+
4447import processing .app .debug .TargetBoard ;
4548import processing .app .debug .TargetPackage ;
4649import processing .app .debug .TargetPlatform ;
@@ -304,8 +307,9 @@ public Base(String[] args) throws Exception {
304307 String [] boardToInstallParts = parser .getBoardToInstall ().split (":" );
305308
306309 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 ());
309313 } else if (boardToInstallParts .length == 2 ) {
310314 List <ContributedPlatform > platformsByName = indexer .getIndex ().findPlatforms (boardToInstallParts [0 ], boardToInstallParts [1 ]);
311315 Collections .sort (platformsByName , new DownloadableContributionVersionComparator ());
You can’t perform that action at this time.
0 commit comments