diff --git a/CHANGES.md b/CHANGES.md index 031b07d63f18..61cc72584bfb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -48,6 +48,9 @@ Unreleased on UNIX-like systems as a unrelated `gmake` binary might exist on Windows. (#3853, @kit-ty-kate) +- `dune subst` now accepts common command-line arguments such as + `--debug-backtraces` (#3878, @ejgallego) + 2.7.1 (2/09/2020) ----------------- diff --git a/bin/subst.ml b/bin/subst.ml index dd473f9adba0..355cd99a96ae 100644 --- a/bin/subst.ml +++ b/bin/subst.ml @@ -58,14 +58,10 @@ 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.build_info + and+ common = Common.term in + Common.set_common common ~targets:[]; + let config = Common.config common in Dune_engine.Scheduler.go ~config Watermarks.subst let command = (term, info)