prefer to print to stderr for console chatter

This commit is contained in:
2024-11-17 02:59:13 +11:00
parent 20e76918fe
commit c239b8e424
9 changed files with 29 additions and 10 deletions

View File

@ -0,0 +1,17 @@
/*
* darwin-apk © 2024 Gay Pizza Specifications
* SPDX-License-Identifier: Apache-2.0
*/
import Foundation
internal func eprint(_ items: Any..., separator: String = " ", terminator: String = "\n") {
var stderr = FileHandle.standardError
print(items, separator: separator, terminator: terminator, to: &stderr)
}
extension FileHandle: @retroactive TextOutputStream {
public func write(_ string: String) {
self.write(Data(string.utf8))
}
}