Move .lake-lock into the build directory

This commit is contained in:
Mac Malone 2021-06-07 05:55:13 -04:00
parent c5c46798fb
commit 8c39a65609

View file

@ -10,7 +10,7 @@ open System
namespace Lake
def lockfile : FilePath := ".lake-lock"
def lockfile : FilePath := buildPath / ".lake-lock"
partial def withLockFile (x : IO α) : IO α := do
acquire
@ -19,7 +19,8 @@ partial def withLockFile (x : IO α) : IO α := do
finally
IO.removeFile lockfile
where
acquire (firstTime := true) :=
acquire (firstTime := true) := do
IO.createDirAll lockfile.parent.get!
try
-- TODO: lock file should ideally contain PID
if !Platform.isWindows then