1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-23 19:21:59 +03:00

Command line --get-pref may be used without name of the target pref.

If pref name is missing, all prefs are printed on stdout.
Should fix/mitigate #2982
This commit is contained in:
Federico Fissore
2015-05-29 15:15:08 +02:00
parent a48906e0c2
commit 935becec64
7 changed files with 22 additions and 15 deletions

View File

@ -90,7 +90,7 @@ public class SplashScreenHelper {
}
private void printText(String str) {
System.out.println(str);
System.err.println(str);
}
}

View File

@ -477,13 +477,7 @@ public class Base {
// Do nothing (intended for only changing preferences)
System.exit(0);
} else if (parser.isGetPrefMode()) {
String value = PreferencesData.get(parser.getGetPref(), null);
if (value != null) {
System.out.println(value);
System.exit(0);
} else {
System.exit(4);
}
BaseNoGui.dumpPrefs(parser);
}
}