Skip to content

Commit 087800e

Browse files
committed
Try locking fingerprints dir
1 parent 07c4650 commit 087800e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Commands/SwiftTool.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ public class SwiftTool {
648648
if !fileSystem.exists(sharedFingerprintsDirectory) {
649649
try fileSystem.createDirectory(sharedFingerprintsDirectory, recursive: true)
650650
}
651+
// And make sure we can lock the directory (which writes a lock file)
652+
try fileSystem.withLock(on: sharedFingerprintsDirectory, type: .exclusive) { }
651653
return sharedFingerprintsDirectory
652654
} catch {
653655
self.observabilityScope.emit(warning: "Failed creating shared fingerprints directory: \(error)")

0 commit comments

Comments
 (0)