Skip to content

How can I progressively iterate over stdout lines with a custom delimiter #1210

@MaddyGuthridge

Description

@MaddyGuthridge

I am attempting to monitor progress of HandBrakeCLI, which outputs its progress delimited by \r instead of \n. Is there a way that I can choose a custom delimiter when progressively iterating over the process's stdout?

I am unable to find any docs on this, and the quick test I threw together seems to indicate that it is not easily possible.

Currently, my workaround is to pipe the output through tr '\r', '\n', but being able to do this directly with execa would make things much simpler.

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