From 6ad5c9515eb2a36b053667151b18d2eed5b7a7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Fri, 31 May 2024 13:26:34 +0200 Subject: [PATCH] Don't hide default port --- src/reynir_www.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/reynir_www.ml b/src/reynir_www.ml index ccb420b..636240a 100644 --- a/src/reynir_www.ml +++ b/src/reynir_www.ml @@ -18,8 +18,7 @@ let program ~target = let local_build _quiet target = Yocaml_unix.execute (program ~target:(Fpath.to_string target)) -let watch quiet target potential_port = - let port = Option.value ~default:default_port potential_port in +let watch quiet target port = let () = local_build quiet target in let target = Fpath.to_string target in let server = Yocaml_unix.serve ~filepath:target ~port (program ~target) in @@ -92,7 +91,7 @@ let watch_cmd = let port_arg = let doc = "The port" in let arg = Arg.info ~doc [ "port"; "P"; "p" ] in - Arg.(value & opt (some int) None & arg) + Arg.(value & opt int default_port & arg) in let info = Cmd.info "watch" ~version ~doc ~exits ~man in Cmd.v info Term.(const watch $ setup_logs $ path_arg $ port_arg)