Skip to content

Commit

Permalink
Reading of stderr from Bitwarden proxy removed (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstrba committed Dec 6, 2022
1 parent 38160cd commit a833d8b
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,12 @@ final class BWCommunicator: BWCommunication {
let outHandle = outputPipe.fileHandleForReading
outHandle.readabilityHandler = receiveData(_:)

let errorPipe = Pipe()
let errorHandle = errorPipe.fileHandleForReading
errorHandle.readabilityHandler = receiveErrorData(_:)

let inputPipe = Pipe()
let inputHandle = inputPipe.fileHandleForWriting

process.executableURL = URL(fileURLWithPath: Self.appPath)
process.arguments = ["chrome-extension://bitwarden"]
process.standardOutput = outputPipe
process.standardError = errorPipe
process.standardInput = inputPipe
process.terminationHandler = processDidTerminate(_:)

Expand Down Expand Up @@ -168,13 +163,6 @@ final class BWCommunicator: BWCommunication {
} while availableData.count >= 2 /*EOF*/
}

private func receiveErrorData(_ fileHandle: FileHandle) {
// Stderr is too verbose. Uncomment if necessary
// if let stderrOutput = String(data: fileHandle.availableData, encoding: .utf8) {
// os_log("Stderr output:\n %s", log: .bitwarden, type: .error, stderrOutput)
// }
}

private func fromByteArray<T>(_ value: [UInt8], _: T.Type) -> T {
return value.withUnsafeBufferPointer {
$0.baseAddress!.withMemoryRebound(to: T.self, capacity: 1) {
Expand Down

0 comments on commit a833d8b

Please sign in to comment.