From acee8da47779fef08665d3464e8bced9eaef3bff Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 24 Mar 2026 12:37:21 +0100 Subject: [PATCH] aiorepl.py: fix infinite prompt spam with /dev/null Previously, when running with "< /dev/null", the REPL was continously sending the prompt "-->" which was needlessly exploding the output. --- internal_filesystem/lib/aiorepl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal_filesystem/lib/aiorepl.py b/internal_filesystem/lib/aiorepl.py index 15026e43..9d431ef8 100644 --- a/internal_filesystem/lib/aiorepl.py +++ b/internal_filesystem/lib/aiorepl.py @@ -114,8 +114,9 @@ async def task(g=None, prompt="--> "): curs = 0 # cursor offset from end of cmd buffer while True: b = await s.read(1) + # MPOS: return on EOF to avoid infinite prompt spam with /dev/null (differs from upstream). if not b: # Handle EOF/empty read - break + return pc = c # save previous character c = ord(b) pt = t # save previous time