kareman / SwiftShell

A Swift framework for shell scripting.
https://kareman.github.io/SwiftShell
MIT License
1.03k stars 87 forks source link

runAsync(bash"") cannot write nothing on onStringOutput on mac osx app standalone #100

Open pjcau opened 3 years ago

pjcau commented 3 years ago

HI,

I did app mac osx in BigSur that send Process().run and write in textEditor the logs. It' a process async that poll some https, and I need logs all inside my apps. It works perfect whe run on xcode but standlone don't write nothing. So I looking for also the xcode forum, the point is for process async that Pipe() cannot buffering, and we can do force it.

I think that yo have the same issue also in this sdk.

That's it's real case, I use upload-symbols to send a 50 symbols, so 10 minute to finish it all.

let asyncCommand = runAsync(bash: /Carthage_FirebaseCrashlytics_scripts/upload-symbols  -gsp /AppHouse/resources/GoogleService-Info-PROD.plist -p ios //Downloads/appDsyms ").onCompletion { command in
            debugPrintOnTerminal(string: " command is \(String(describing: command))")
        }
        asyncCommand.stdout.onStringOutput {
            print($0)
            debugPrintOnTerminal(string: " output is \(String(describing: $0))")
        }

I cannot use the command.finish(), because lock the app.

Thanks all.

Jonny

pjcau commented 3 years ago

Hi Guys,

is there any news?

BR

J

xMarkusSpringerx commented 3 years ago

I do have the same issue unfortunately.