From d6f5f7993f1936783d99612a3804142c0d600571 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 23 Dec 2018 08:46:47 -0500 Subject: [PATCH] Add DUNE_WORKSPACE env var This variable is equivalent to setting --workspace. Signed-off-by: Rudi Grinberg --- CHANGES.md | 5 ++++- bin/common.ml | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index fcc71f79d6f1..363c83a02de1 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. (#xxxx, 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