Skip to content

Commit

Permalink
Fix plugin crashing with large output #313 #294
Browse files Browse the repository at this point in the history
  • Loading branch information
melonamin committed May 1, 2022
1 parent 4dbe224 commit c4056e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SwiftBar/Utility/RunScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ private extension Process {
let errorData = errorPipe.fileHandleForReading.readDataToEndOfFile()
throw ShellOutError(terminationStatus: terminationStatus, errorData: errorData, outputData: data)
}
waitUntilExit()

outputData = outputPipe.fileHandleForReading.readDataToEndOfFile()
errorData = errorPipe.fileHandleForReading.readDataToEndOfFile()

waitUntilExit()

if terminationStatus != 0 {
throw ShellOutError(
terminationStatus: terminationStatus,
Expand Down

0 comments on commit c4056e6

Please sign in to comment.