Skip to content

Commit

Permalink
haxe: fix core readline function: print prompt
Browse files Browse the repository at this point in the history
Use the prompt provided as a parameter and not just "user> ".
  • Loading branch information
kanaka committed Aug 13, 2024
1 parent d1afe8d commit 99d3ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impls/haxe/Compat.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class Compat {

public static function readline(prompt:String) {
#if js
var line = RL.readline("user> ");
var line = RL.readline(prompt);
if (line == null) { throw new haxe.io.Eof(); }
#else
Sys.print("user> ");
Sys.print(prompt);
var line = Sys.stdin().readLine();
#end
return line;
Expand Down

0 comments on commit 99d3ce5

Please sign in to comment.