diff --git a/Lake/Make.lean b/Lake/Make.lean index 60ca57ce2a..75702baf24 100644 --- a/Lake/Make.lean +++ b/Lake/Make.lean @@ -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