1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-22 08:22:04 +03:00

Some CLI args are parsed before initializing packages. --board argument is parsed after. Fixes #3261

This commit is contained in:
Federico Fissore
2015-06-05 17:18:50 +02:00
parent 455fecff13
commit 84d10a8ea0
3 changed files with 37 additions and 22 deletions

View File

@ -275,6 +275,9 @@ public class Base {
BaseNoGui.notifier = new GUIUserNotifier(this);
this.recentSketchesMenuItems = new LinkedList<JMenuItem>();
CommandlineParser parser = new CommandlineParser(args);
parser.parseArgumentsPhase1();
BaseNoGui.checkInstallationFolder();
String sketchbookPath = BaseNoGui.getSketchbookPath();
@ -302,7 +305,7 @@ public class Base {
this.pdeKeywords = new PdeKeywords();
this.pdeKeywords.reload();
CommandlineParser parser = CommandlineParser.newCommandlineParser(args);
parser.parseArgumentsPhase2();
for (String path : parser.getFilenames()) {
// Correctly resolve relative paths