mirror of https://github.com/noisymime/Arduino.git
Improve commandline handling control flow
This uses a switch on the action value, which makes it more clear what code runs when. No actual behaviour is changed, most of the changes in this commit are indentation changes.
This commit is contained in:
parent
f3565a1bda
commit
7548591d51
|
@ -430,7 +430,9 @@ public class Base {
|
|||
}
|
||||
}
|
||||
|
||||
if (action == ACTION.UPLOAD || action == ACTION.VERIFY) {
|
||||
switch (action) {
|
||||
case VERIFY:
|
||||
case UPLOAD:
|
||||
// Set verbosity for command line build
|
||||
Preferences.set("build.verbose", "" + doVerboseBuild);
|
||||
Preferences.set("upload.verbose", "" + doVerboseUpload);
|
||||
|
@ -457,8 +459,8 @@ public class Base {
|
|||
|
||||
// No errors exit gracefully
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
break;
|
||||
case GUI:
|
||||
// Check if there were previously opened sketches to be restored
|
||||
restoreSketches();
|
||||
|
||||
|
@ -471,6 +473,8 @@ public class Base {
|
|||
if (Preferences.getBoolean("update.check")) {
|
||||
new UpdateCheck(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void processBoardArgument(String selectBoard) {
|
||||
|
|
Loading…
Reference in New Issue