FIX: fixed issues due to ScrollView limit and stream rate
This commit is contained in:
parent
80cddb0314
commit
4abda00033
2 changed files with 34 additions and 12 deletions
|
@ -34,6 +34,7 @@ func runShellCommandAsync(command: String, outputText: Binding<String>?, showBut
|
|||
|
||||
var observer: NSObjectProtocol?
|
||||
|
||||
|
||||
observer = NotificationCenter.default.addObserver(forName: .NSFileHandleDataAvailable, object: fileHandle, queue: nil) { _ in
|
||||
let data = fileHandle.availableData
|
||||
if let output = String(data: data, encoding: .utf8), !output.isEmpty {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue