Skip to content
Snippets Groups Projects
Commit 94f49c63 authored by Michele Alberti's avatar Michele Alberti
Browse files

Enable detect by default for the moment.

parent b3bb0f3c
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,7 @@ let setup_logs =
(* Commands. *)
let config cmd detect filename () =
let filename = Option.value filename ~default:Solver.default_config_filename in
Logs.debug
(fun m -> m "Command `%s' with configuration file `%s'."
cmd filename);
......@@ -87,7 +88,7 @@ let config_cmd =
let doc =
Format.sprintf "$(b,FILE) to write the %s configuration to." caisar
in
Arg.(value & pos 0 file Solver.default_config_filename
Arg.(value & pos 0 (some string) None
& info [] ~docv:docv_filename ~doc)
in
let doc = Format.sprintf "%s configuration." caisar in
......@@ -104,9 +105,11 @@ let config_cmd =
in
Term.(ret
(const (fun cmdname detect filename _ ->
if not detect
if not detect && Option.is_none filename
then `Help (`Pager, Some "config")
else `Ok (config cmdname detect filename ()))
else
(* TODO: Do not enable [detect] by default. *)
`Ok (config cmdname true filename ()))
$ const cmdname $ detect $ filename $ setup_logs)),
Term.info cmdname ~sdocs:Manpage.s_common_options ~envs ~exits ~doc ~man
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment