Skip to content

Commit 77a5459

Browse files
committed
Fix use of FileHandle.standardError
1 parent b2a4bec commit 77a5459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/WasmKitTests/Spectest/Spectest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ struct NullSpectestProgressReporter: SpectestProgressReporter {
4848

4949
struct StderrSpectestProgressReporter: SpectestProgressReporter {
5050
func log(_ message: String, verbose: Bool) {
51-
fputs(message + "\n", FileHandle.standardError.fileDescriptor)
51+
try! FileHandle.standardError.write(contentsOf: Data((message + "\n").utf8))
5252
}
5353
func log(_ message: String, path: String, location: Location, verbose: Bool) {
5454
let (line, _) = location.computeLineAndColumn()
55-
fputs("\(path):\(line): " + message + "\n", FileHandle.standardError.fileDescriptor)
55+
try! FileHandle.standardError.write(contentsOf: Data(("\(path):\(line): " + message + "\n").utf8))
5656
}
5757
}
5858

0 commit comments

Comments
 (0)