Merge pull request #5602 from aivarannamaa/skip-main-script-in-raw-mode-soft-reboot

Don't run main script when soft-rebooting in raw mode
This commit is contained in:
Scott Shawcroft 2021-11-23 10:32:48 -08:00 committed by GitHub
commit af2ac0aa60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

6
main.c
View File

@ -858,7 +858,11 @@ int __attribute__((used)) main(void) {
serial_write_compressed(translate("soft reboot\n"));
}
first_run = false;
skip_repl = run_code_py(safe_mode);
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
skip_repl = run_code_py(safe_mode);
} else {
skip_repl = false;
}
} else if (exit_code != 0) {
break;
}