From addb7b9acca2ddff11b6535c4fe17495a34d32e1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 5 Nov 2024 15:03:28 +0100 Subject: [PATCH] install: echo characters that the user inputs at the prompt --- fdroidserver/install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fdroidserver/install.py b/fdroidserver/install.py index c3b1f2b5..c6f1085d 100644 --- a/fdroidserver/install.py +++ b/fdroidserver/install.py @@ -295,7 +295,7 @@ def prompt_user(yes, msg): """Prompt user for yes/no, supporting Enter and Esc as accepted answers.""" run_install = yes if yes is None and sys.stdout.isatty(): - print(msg, flush=True) + print(msg, end=' ', flush=True) answer = '' while True: in_char = read_char() @@ -303,8 +303,10 @@ def prompt_user(yes, msg): break if not in_char.isprintable(): sys.exit(1) + print(in_char, end='', flush=True) answer += in_char run_install = strtobool(answer) + print() return run_install