File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ let main =
9191 let t = Cmdliner.Term. (const f $ Cmd_arg. options) in
9292 Cmdliner.Cmd. v Cmd_arg. info t
9393
94- let (_ : int ) =
94+ let (exit_code : int ) =
9595 try Cmdliner.Cmd. eval ~catch: false ~argv: Sys. argv main with
9696 | (Match_failure _ | Assert_failure _ | Not_found ) as exc ->
9797 let backtrace = Printexc. get_backtrace () in
@@ -101,10 +101,12 @@ let (_ : int) =
101101 Sys. argv.(0 );
102102 Format. eprintf " Error: %s@." (Printexc. to_string exc);
103103 prerr_string backtrace;
104- exit 1
104+ 1
105105 | Failure s ->
106106 Format. eprintf " %s: Error: %s@." Sys. argv.(0 ) s;
107- exit 1
107+ 1
108108 | exc ->
109109 Format. eprintf " %s: Error: %s@." Sys. argv.(0 ) (Printexc. to_string exc);
110- exit 1
110+ 1
111+
112+ let () = exit exit_code
Original file line number Diff line number Diff line change 1919
2020open Js_of_ocaml_compiler.Stdlib
2121
22- let (_ : int ) =
22+ let (exit_code : int ) =
2323 try Cmdliner.Cmd. eval ~catch: false ~argv: Sys. argv Link_wasm. command with
2424 | (Match_failure _ | Assert_failure _ | Not_found ) as exc ->
2525 let backtrace = Printexc. get_backtrace () in
@@ -29,10 +29,12 @@ let (_ : int) =
2929 Sys. argv.(0 );
3030 Format. eprintf " Error: %s@." (Printexc. to_string exc);
3131 prerr_string backtrace;
32- exit 1
32+ 1
3333 | Failure s ->
3434 Format. eprintf " %s: Error: %s@." Sys. argv.(0 ) s;
35- exit 1
35+ 1
3636 | exc ->
3737 Format. eprintf " %s: Error: %s@." Sys. argv.(0 ) (Printexc. to_string exc);
38- exit 1
38+ 1
39+
40+ let () = exit exit_code
You can’t perform that action at this time.
0 commit comments