Don't save the db if _build doesn't exist

This commit is contained in:
Jeremie Dimino 2017-03-06 15:33:03 +00:00
parent 4722d0e0d3
commit 78e47bafa8
1 changed files with 2 additions and 1 deletions

View File

@ -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