Skip to content

Commit e0e5c87

Browse files
committed
removed unnecessary lock
1 parent d3fed83 commit e0e5c87

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sources/SourceControl/RepositoryManager.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,16 @@ public class RepositoryManager {
283283
editable: Bool
284284
) throws {
285285
let lock = FileLock(name: handle.repository.basename, cachePath: self.path)
286-
try lock.withLock {
286+
// FIXME: Workaround for `FileLock` only working on `LocaFileSystem`
287+
if localFileSystem.exists(self.path) {
288+
try lock.withLock {
289+
try provider.cloneCheckout(
290+
repository: handle.repository,
291+
at: path.appending(handle.subpath),
292+
to: destinationPath,
293+
editable: editable)
294+
}
295+
} else {
287296
try provider.cloneCheckout(
288297
repository: handle.repository,
289298
at: path.appending(handle.subpath),

0 commit comments

Comments
 (0)