Skip to content

Commit b2e02cc

Browse files
committed
Use writeIfChanged
writeFileContents can fail if the file already exists.
1 parent 2d54e48 commit b2e02cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/TestUtilities/OutputFileMapCreator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct OutputFileMapCreator {
3030
derivedData: AbsolutePath,
3131
to dst: AbsolutePath) {
3232
let creator = Self(module: module, inputPaths: inputPaths, derivedData: derivedData)
33-
try! localFileSystem.writeFileContents(dst, bytes: ByteString(creator.generateData()))
33+
try! localFileSystem.writeIfChanged(path: dst, bytes: ByteString(creator.generateData()))
3434
}
3535

3636
private func generateDict() -> [String: [String: String]] {

0 commit comments

Comments
 (0)