Skip to content

Add a path to feed bytes to the stdin of a Process #22918

@svenier

Description

@svenier

In our build flow we have some commands that read their input from stdin. With the current Process object, we need to setup and run a shell command instead of directly running our desired command to redirect input from a file.

If stdin were handled symmetrically to how stdout/stderr work, we could just directly invoke our desired command without the overhead (populating the sandbox with everything needed to run the shell) or risk (users stuffing shell metacharacters) of setting up a shell.

See https://pantsbuild.slack.com/archives/C01CQHVDMMW/p1763760163111359 for a long conversation about this.

[edit to fix typos]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions