diff --git a/src/build_system.ml b/src/build_system.ml index ebc26c2d..7d227240 100644 --- a/src/build_system.ml +++ b/src/build_system.ml @@ -384,7 +384,8 @@ module Trace = struct |> List.map ~f:(fun (path, hash) -> Sexp.List [ Atom (Path.to_string path); Atom (Digest.to_hex hash) ])) in - write_file file (Sexp.to_string sexp) + if Sys.file_exists "_build" then + write_file file (Sexp.to_string sexp) let load () = let trace = Hashtbl.create 1024 in