From 8c39a6560947c8e09d457ad615d4fcd2fd68b32d Mon Sep 17 00:00:00 2001 From: Mac Malone Date: Mon, 7 Jun 2021 05:55:13 -0400 Subject: [PATCH] Move `.lake-lock` into the build directory --- Lake/Make.lean | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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