mirror of
https://github.com/GayPizzaSpecifications/darwin-apk.git
synced 2025-08-04 05:51:31 +00:00
prefer to print to stderr for console chatter
This commit is contained in:
17
Sources/dpk-cli/StandardErrorPrint.swift
Normal file
17
Sources/dpk-cli/StandardErrorPrint.swift
Normal 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))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user