Skip to content

Closes Filehandle.standardOutput #22

Closed
@SteveBarnegren

Description

@SteveBarnegren

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions