Skip to content

Commit b17cc70

Browse files
committed
turn on MICROPY_PYEXEC_ENABLE_EXIT_CODE_HANDLING all the time
1 parent d085279 commit b17cc70

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ int __attribute__((used)) main(void) {
11491149
} else {
11501150
skip_repl = false;
11511151
}
1152-
} else if (exit_code != 0) {
1152+
} else if (exit_code != PYEXEC_NORMAL_EXIT) {
11531153
break;
11541154
}
11551155

py/circuitpy_mpconfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ extern void common_hal_mcu_enable_interrupts(void);
5151
#define MICROPY_VFS_LFS1 (0)
5252
#define MICROPY_VFS_LFS2 (0)
5353

54+
// Always turn on exit code handling
55+
#define MICROPY_PYEXEC_ENABLE_EXIT_CODE_HANDLING (1)
56+
5457
#ifndef MICROPY_GCREGS_SETJMP
5558
#define MICROPY_GCREGS_SETJMP (0)
5659
#endif

0 commit comments

Comments
 (0)