Open Huy-Ngo opened 9 months ago
Maybe this have something to do with input()
at sanic/cli/console.py:220 being interrupted not handled correctly?
What version of Linux are you on? This is not my experience at all using Arch.
I'm using Alpine Linux. Using its own libc and coreutils, I suppose it cause this issue.
I've just tried this again with latest PyPI (Arch's packaged sanic doesn't have REPL) on Archlinux on WSL and has the same problem. Windows itself does not have this issue (perhaps it doesn't even have no-echo mode in the first place? I'm not familiar with Windows).
I also find that Enter key sends ^M
and backspace sending ^?
when running interactive commands like pacman or ed after this and I don't know how to change that other than exiting the terminal (edit: stty sane
fixes both this and the no echo issue, for anyone else who encounters this). However, some REPL shells like python, node or iex (elixir REPL) doesn't have this issue.
OK I can confirm that this happens with ed
on alpine, but not apk
, so it's probably not a distro issue
OK it turns out that this depends on shell too: I encountered this bug on bash, but not zsh or fish. zsh also has the ^M bug, though.
Meanwhile ksh and dash would be borked entirely and "enter" doesn't even work on the main shell
Is there an existing issue for this?
Describe the bug
When running sanic in development mode without turning off REPL, that is,
sanic --dev server
, if I don't enter the REPL mode before exiting, the terminal becomes no-echo (what I type does not shows on screen). (This can be turned off by runningstty echo
, but it shouldn't happen in the first place.)Steps to reproduce:
sanic --dev server
Ctrl+C
Ctrl+C
exit()
The terminal does not becomes no-echo if I enter the REPL, then exit with
Ctrl+D
Expected Behavior
The terminal is not in no-echo mode.
How do you run Sanic?
Sanic CLI
Operating System
Linux
Sanic Version
23.12.0