mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-21 15:56:21 +08:00
Load prefs only after parsing of options, don't clutter -v
This commit is contained in:
parent
3d4d90eac5
commit
d7cfaae17f
|
@ -691,6 +691,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
bool flash_mode = false;
|
||||
bool flash_can_write_bl = false;
|
||||
bool debug_mode_forced = false;
|
||||
int flash_num_files = 0;
|
||||
char *flash_filenames[FLASH_MAX_FILES];
|
||||
|
||||
|
@ -698,16 +699,6 @@ int main(int argc, char *argv[]) {
|
|||
set_my_executable_path();
|
||||
set_my_user_directory();
|
||||
|
||||
#ifdef USE_PREFERENCE_FILE
|
||||
// Load Settings and assign
|
||||
// This will allow the command line to override the settings.json values
|
||||
preferences_load();
|
||||
// quick patch for debug level
|
||||
g_debugMode = session.client_debug_level;
|
||||
// settings_save ();
|
||||
// End Settings
|
||||
#endif
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
|
||||
if (argv[i][0] != '-') {
|
||||
|
@ -779,6 +770,7 @@ int main(int argc, char *argv[]) {
|
|||
return 1;
|
||||
}
|
||||
g_debugMode = demod;
|
||||
debug_mode_forced = true;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
@ -886,6 +878,17 @@ int main(int argc, char *argv[]) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef USE_PREFERENCE_FILE
|
||||
// Load Settings and assign
|
||||
// This will allow the command line to override the settings.json values
|
||||
preferences_load();
|
||||
// quick patch for debug level
|
||||
if (! debug_mode_forced)
|
||||
g_debugMode = session.client_debug_level;
|
||||
// settings_save ();
|
||||
// End Settings
|
||||
#endif
|
||||
|
||||
#ifndef USE_PREFERENCE_FILE
|
||||
// comment next 2 lines to use session values set from settings_load
|
||||
session.supports_colors = DetectWindowsAnsiSupport();
|
||||
|
|
Loading…
Reference in a new issue