Skip to content

Commit 146e883

Browse files
authored
Don't run main script when soft-rebooting in raw mode
1 parent 3b7d2f1 commit 146e883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
333333
// Collects stickiness bits that apply in the current situation.
334334
uint8_t next_code_stickiness_situation = SUPERVISOR_NEXT_CODE_OPT_NEWLY_SET;
335335

336-
if (safe_mode == NO_SAFE_MODE) {
336+
if (safe_mode == NO_SAFE_MODE && pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
337337
static const char *const supported_filenames[] = STRING_LIST(
338338
"code.txt", "code.py", "main.py", "main.txt");
339339
#if CIRCUITPY_FULL_BUILD

0 commit comments

Comments
 (0)