Skip to content

Commit c9d4a49

Browse files
committed
Add Support for CRLF when Parsing Ninja Output
On Windows, Ninja outputs CRLF instead of just an LF.
1 parent c045a1f commit c9d4a49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/ISDBTibs/TibsBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ extension TibsBuilder {
134134

135135
var result = Set<String>()
136136
while let range = out.range(of: "] Indexing ", range: rest) {
137-
let srcEnd = out[range.upperBound...].index(of: "\n") ?? rest.upperBound
137+
let srcEnd = out[range.upperBound...].firstIndex(where: {$0.isNewline}) ?? rest.upperBound
138138
result.insert(String(out[range.upperBound ..< srcEnd]))
139139
rest = srcEnd..<rest.upperBound
140140
}

0 commit comments

Comments
 (0)