diff --git a/CHANGES.md b/CHANGES.md index fcc71f79d6f1..096efdecec37 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -51,7 +51,10 @@ unreleased - Fix handling of Control+C in watch mode (#1678, fixes #1671, @diml) - Look for jsoo runtime in the same dir as the `js_of_ocaml` binary - when the ocamlfind package is not available (#1467, @nobj) + when the ocamlfind package is not available (#1467, @nojb) + +- Add `DUNE_WORKSPACE` variable. This variable is equivalent to setting + `--workspace` in the command line. (#1711, fix #1503, @rgrinberg) 1.6.2 (05/12/2018) ------------------ diff --git a/bin/common.ml b/bin/common.ml index 5f767b92a3c2..2fa66d9aed4e 100644 --- a/bin/common.ml +++ b/bin/common.ml @@ -160,10 +160,11 @@ let term = $(b,--verbose) as well, to make sure that commands are printed before they are being executed.|}) and workspace_file = + let doc = "Use this specific workspace file instead of looking it up." in Arg.(value & opt (some path) None - & info ["workspace"] ~docs ~docv:"FILE" - ~doc:"Use this specific workspace file instead of looking it up.") + & info ["workspace"] ~docs ~docv:"FILE" ~doc + ~env:(Arg.env_var ~doc "DUNE_WORKSPACE")) and auto_promote = Arg.(value & flag