File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1678,7 +1678,7 @@ print_q(Q, Default) when is_list(Default) ->
16781678% % Defval = string() | mandatory
16791679ask (Q , Default , Verify ) when is_list (Q ) andalso is_function (Verify ) ->
16801680 print_q (Q , Default ),
1681- PrelAnsw = io :get_line ('' ),
1681+ PrelAnsw = conv_bin_to_list ( io :get_line ('' ) ),
16821682 Answer =
16831683 case remove_newline (PrelAnsw ) of
16841684 " " when Default =/= mandatory -> Default ;
@@ -1741,7 +1741,12 @@ guess_engine_name() ->
17411741% {_,_} -> "user_id"
17421742% end.
17431743
1744-
1744+ % This is neccessary as in Elixir io:get_line returns a binary
1745+ conv_bin_to_list (Bin ) when is_binary (Bin ) ->
1746+ binary :bin_to_list (Bin );
1747+ conv_bin_to_list (Str ) ->
1748+ Str .
1749+
17451750remove_newline (Str ) ->
17461751 lists :delete ($\n , Str ).
17471752
You can’t perform that action at this time.
0 commit comments