From ca02dbd4aa6630b8df1fe15e9f9a1edddcb16e6b Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Fri, 4 Sep 2020 13:37:54 -0700 Subject: [PATCH] [sledge][buck] Use same mode for buck root as buck build Summary: Attempt to avoid churning the build mode, for better caching. Reviewed By: ngorogiannis Differential Revision: D23459515 fbshipit-source-id: ea434fb13 --- sledge/bin/sledge_buck.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sledge/bin/sledge_buck.ml b/sledge/bin/sledge_buck.ml index 3321563af..c019c70bf 100644 --- a/sledge/bin/sledge_buck.ml +++ b/sledge/bin/sledge_buck.ml @@ -26,7 +26,9 @@ let cwd = Unix.getcwd () (* query buck for root *) let buck_root = let open Process in - lazy (String.strip (eval (run "buck" ["root"] |- read_all))) + lazy + (String.strip + (eval (run "buck" ["root"; "@mode/" ^ Lazy.force mode] |- read_all))) (* use buck root for working directory *) let context () =