diff --git a/src/bin/cli_helpers.ml b/src/bin/cli_helpers.ml index dacac127e..ee757ffba 100644 --- a/src/bin/cli_helpers.ml +++ b/src/bin/cli_helpers.ml @@ -9,4 +9,8 @@ let toplevel ~(display_format : string) (x : string result) = failwith "Display format" ) in - Format.printf "%a" (formatted_string_result_pp display_format) x + match x with + | Ok _ -> Format.printf "%a" (formatted_string_result_pp display_format) x + | Error _ -> + Format.eprintf "%a" (formatted_string_result_pp display_format) x ; + exit 1