Skip to content

Commit

Permalink
do not repeat installation prompt for unrecognized versions (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatchi authored Feb 27, 2020
1 parent 50ad22c commit 3f2124b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions executable/Use.re
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ let rec askIfInstall = (~version, ~quiet, retry) => {
switch%lwt (Lwt_io.read_line(Lwt_io.stdin)) {
| "Y"
| "y" =>
let%lwt _ = Install.run(~version);
retry(~version, ~quiet);
let%lwt res = Install.run(~version);
switch (res) {
| Error(_) => Lwt.return_error(1)
| Ok(_) => retry(~version, ~quiet)
};
| "N"
| "n" =>
let%lwt () = Lwt_io.write_line(Lwt_io.stderr, "Not installing!");
Expand Down

0 comments on commit 3f2124b

Please sign in to comment.