Fix branch names cannot end in .lock

which was happening for pythonPackages.flufl_lock
This commit is contained in:
Ryan Mulligan 2022-02-10 08:37:40 -08:00
parent 58c5426a5b
commit 6d46b9ee14

View File

@ -730,7 +730,7 @@ withWorktree branch attrpath updateEnv action = do
bracket
(do
dir <- U.worktreeDir
let path = dir <> "/" <> T.unpack attrpath
let path = dir <> "/" <> T.unpack (T.replace ".lock" "_lock" attrpath)
Git.worktreeRemove path
Git.delete1 (branchName updateEnv)
Git.worktreeAdd path branch updateEnv