Skip to content

Commit b1f77f1

Browse files
Switch from untracked path checking to compile-time flag
Signed-off-by: Marek Kubica <[email protected]>
1 parent a7bf32c commit b1f77f1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/dune_rules/format_rules.ml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ end
3333

3434
module Ocamlformat = struct
3535
let dev_tool_lock_dir_exists () =
36-
Lock_dir.dev_tool_external_lock_dir Ocamlformat
37-
|> Path.external_
38-
|> Path.Untracked.exists
36+
(* we assume that if lock_dev_tools is set, then the lock dir was created
37+
via locking and can expect it to exist. If it doesn't, it's a bug
38+
*)
39+
match Config.get Compile_time.lock_dev_tools with
40+
| `Enabled -> true
41+
| `Disabled -> false
3942
;;
4043

4144
(* Config files for ocamlformat. When these are changed, running

0 commit comments

Comments
 (0)