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.
2 parents 32a1836 + 40b149a commit 8b60325Copy full SHA for 8b60325
Sources/TSCUtility/JSONMessageStreamingParser.swift
@@ -101,6 +101,11 @@ private extension JSONMessageStreamingParser {
101
102
/// Throwing implementation of the parse function.
103
func parseImpl<C>(bytes: C) throws where C: Collection, C.Element == UInt8 {
104
+#if os(Windows)
105
+ let carriageReturn = UInt8(ascii: "\r")
106
+ let bytes = bytes.filter { $0 != carriageReturn }
107
+#endif
108
+
109
switch state {
110
case .parsingMessageSize:
111
if let newlineIndex = bytes.firstIndex(of: newline) {
0 commit comments