mirror of
https://github.com/esp8266/Arduino.git
synced 2025-12-18 10:22:18 +03:00
Some CLI args are parsed before initializing packages. --board argument is parsed after. Fixes #3261
This commit is contained in:
@@ -427,6 +427,9 @@ public class BaseNoGui {
|
||||
}
|
||||
|
||||
static public void init(String[] args) throws Exception {
|
||||
CommandlineParser parser = new CommandlineParser(args);
|
||||
parser.parseArgumentsPhase1();
|
||||
|
||||
String sketchbookPath = getSketchbookPath();
|
||||
|
||||
// If no path is set, get the default sketchbook folder for this platform
|
||||
@@ -436,13 +439,13 @@ public class BaseNoGui {
|
||||
else
|
||||
showError(_("No sketchbook"), _("Sketchbook path not defined"), null);
|
||||
}
|
||||
|
||||
|
||||
BaseNoGui.initPackages();
|
||||
|
||||
// Setup board-dependent variables.
|
||||
onBoardOrPortChange();
|
||||
|
||||
CommandlineParser parser = CommandlineParser.newCommandlineParser(args);
|
||||
|
||||
parser.parseArgumentsPhase2();
|
||||
|
||||
for (String path: parser.getFilenames()) {
|
||||
// Correctly resolve relative paths
|
||||
|
||||
Reference in New Issue
Block a user