diff options
author | Yu-Ming Chang <yuming.chang@iot-hmi.com> | 2020-05-14 16:49:13 +0800 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-05-16 14:13:15 +1000 |
commit | dd8db974d7c9e5bf54da1ca1383af674d6b7b27e (patch) | |
tree | 0c46f644e0da83b566a3a60fd9d9b8ff65cbb155 | |
parent | cd9a8c174209c869bd590e8408503dc20863c291 (diff) |
unix/main: Enter REPL when inspect active, even with stdin redirected.
This is how CPython behaves.
-rw-r--r-- | ports/unix/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/unix/main.c b/ports/unix/main.c index 5251fe8ae..c38b7b0c2 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -657,7 +657,7 @@ MP_NOINLINE int main_(int argc, char **argv) { inspect = true; } if (ret == NOTHING_EXECUTED || inspect) { - if (isatty(0)) { + if (isatty(0) || inspect) { prompt_read_history(); ret = do_repl(); prompt_write_history(); |