Skip to content

Commit 776598f

Browse files
Arvid Jakobssonkit-ty-kate
authored andcommitted
Read full lines when asking for user input when TERM=dumb
1 parent db7aa8e commit 776598f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

master_changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ users)
3232
## Remove
3333

3434
## UI
35+
* Read full lines when asking for user input when `TERM=dumb` [#6829 @arvidj - fix #6828]
3536

3637
## Switch
3738

src/core/opamConsole.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ let short_user_input ~prompt ?default ?on_eof f =
716716
let on_eof = OpamStd.Option.Op.(on_eof ++ default) in
717717
let prompt () = print_string prompt; flush stdout in
718718
try
719-
if OpamStd.Sys.(not tty_out || os () = Win32 || os () = Cygwin) then
719+
if OpamStd.Sys.(not tty_out || os () = Win32 || os () = Cygwin || Lazy.force dumb_term) then
720720
let rec loop () =
721721
prompt ();
722722
let input = match String.lowercase_ascii (read_line ()) with

0 commit comments

Comments
 (0)