Closed melMass closed 7 years ago
Hi, have you tried using the onStringOutput method?
let cmd = runAsync("cmd")
cmd.stdout.onStringOutput { output:String in
// called every time there is new output
}
Thanks that's what I was looking for
Hi Kameran,
I'm having hard time understanding your Async implementation. I'm not using SS in CLI but as part of a GUI app. I'm trying to bind the PID's output to the UI.
Before SwiftShell I used to chain a fileHandle to a Notification Center Observer in background which allowed me to update GUI or anything Async.
I'm trying to find the same paradigm in SS but all my attempts to get stdout block the program. Is SS meant for such task or am I stuck with the Process>Pipe>FileHandle(in BG)>NCObserver