Consider sketchbook and bundled libraries folders only if they exists

This commit is contained in:
Cristian Maglie 2016-12-28 20:31:52 +01:00 committed by Cristian Maglie
parent a044f59634
commit ff5b9f6660
1 changed files with 2 additions and 4 deletions

View File

@ -237,10 +237,8 @@ public class Compiler implements MessageConsumer {
addPathFlagIfPathExists(cmd, "-tools", Paths.get(BaseNoGui.getHardwarePath(), "tools", "avr").toFile());
addPathFlagIfPathExists(cmd, "-tools", installedPackagesFolder);
cmd.add("-built-in-libraries");
cmd.add(BaseNoGui.getContentFile("libraries").getAbsolutePath());
cmd.add("-libraries");
cmd.add(BaseNoGui.getSketchbookLibrariesFolder().getAbsolutePath());
addPathFlagIfPathExists(cmd, "-built-in-libraries", BaseNoGui.getContentFile("libraries"));
addPathFlagIfPathExists(cmd, "-libraries", BaseNoGui.getSketchbookLibrariesFolder());
String fqbn = Stream.of(aPackage.getId(), platform.getId(), board.getId(), boardOptions(board)).filter(s -> !s.isEmpty()).collect(Collectors.joining(":"));
cmd.add("-fqbn=" + fqbn);