Don't hide default port
This commit is contained in:
parent
8e79cb49ee
commit
6ad5c9515e
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue