Skip to content

Consider supporting Result | string for options.stdin #104

@porada

Description

@porada

Would you be open to supporting string for options.stdin? If so, I’d be happy to submit a PR.

Right now, stdin only accepts another process/result, so passing arbitrary text values (where arguments don’t work) requires writing to the underlying child process stream directly.

Before

const proc = x('fish_indent', []);
proc.process?.stdin?.end(text);

const { stdout } = await process;

(source)

After

const { stdout } = await exec('fish_indent', [], {
    stdin: text
});

I believe this would be a small, backward-compatible change that keeps the API tiny.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions