Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes Filehandle.standardOutput #22

Closed
SteveBarnegren opened this issue Nov 18, 2017 · 1 comment
Closed

Closes Filehandle.standardOutput #22

SteveBarnegren opened this issue Nov 18, 2017 · 1 comment

Comments

@SteveBarnegren
Copy link
Contributor

Hi John,

I'm not familiar with the FileHandle api and usage, so forgive me if I'm using it incorrectly here!

I'm trying to 'shell out' to a command that prints asynchronously, and I'd like to see that output in realtime, just as if I'd called it from Terminal.

I can pass in FileHandle.standardOutput to achieve this, like so:

try shellOut(to: "some command", outputHandle: FileHandle.standardOutput)

It works great, but I can't see any output, for instance from print() after ShellOut returns.

It looks like this is because ShellOut calls outputHandle?.closeFile()

Is there a currently supported way to achieve this? If not, would you accept a PR to add this functionality?

@JohnSundell
Copy link
Owner

Hi @SteveBarnegren! 👋

Async output it not yet supported by ShellOut, but I'd love to see it supported - I would totally accept a PR that adds it 👍 Hope you don't mind, but I'll close this issue as a duplicate, since we already have an issue for async output here: #11. Let me know there if this is something that you'd like to work on 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants