We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77f7ac7 commit 5c3e6acCopy full SHA for 5c3e6ac
Sources/PackageGraph/PinsStore.swift
@@ -161,14 +161,20 @@ fileprivate struct PinsStorage {
161
return
162
}
163
164
- let data: Data
+ var data: Data
165
if toolsVersion >= .v5_6 {
166
let container = try V2(pins: pins, mirrors: mirrors)
167
data = try self.encoder.encode(container)
168
} else {
169
let container = try V1(pins: pins, mirrors: mirrors)
170
171
172
+ #if !os(Windows)
173
+ // rdar://83646952: add newline for POSIXy systems
174
+ if data.last != 0x0a {
175
+ data.append(0x0a)
176
+ }
177
+ #endif
178
try self.fileSystem.writeFileContents(self.path, data: data)
179
180
0 commit comments