Skip to content

Commit

Permalink
[dune subst] Interpret common command line flags.
Browse files Browse the repository at this point in the history
In particular I wanted this as to have `dune subst` interpret
`--debug-backtraces` in the context of #3219

Signed-off-by: Emilio Jesus Gallego Arias <e+git@x80.org>
  • Loading branch information
ejgallego committed Oct 23, 2020
1 parent 2a1ed9e commit 68b32b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Unreleased
fixes problems with `dune subst` in the presence of unicode
files. Fixes #3219 (#3879, @ejgallego)

- `dune subst` now accepts common command-line arguments such as
`--debug-backtraces` (#3878, @ejgallego)

2.7.1 (2/09/2020)
-----------------

Expand Down
11 changes: 3 additions & 8 deletions bin/subst.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,9 @@ let man =
let info = Term.info "subst" ~doc ~man

let term =
let+ () = Common.build_info in
let config : Config.t =
{ Config.default with display = Quiet; concurrency = Fixed 1 }
in
Path.set_root (Path.External.cwd ());
Path.Build.set_build_dir (Path.Build.Kind.of_string Common.default_build_dir);
Config.init config;
Log.init_disabled ();
let+ common = Common.term in
Common.set_common ~log_file:No_log_file common ~targets:[];
let config = Common.config common in
Dune_engine.Scheduler.go ~config Watermarks.subst

let command = (term, info)

0 comments on commit 68b32b6

Please sign in to comment.