Skip to content

STDERR is merged with STDOUT in wp-env run commands #65016

@westonruter

Description

@westonruter

Description

Commands that output to STDERR are unexpectedly combined with STDOUT when run in a container via wp-env run.

Step-by-step reproduction instructions

When running the following command, no output should be displayed since ls writes the error message to STDERR:

ls non_existent_file 2>/dev/null

Nevertheless, with wp-env run, this is not the case:

npm run --silent wp-env run cli ls non_existent_file 2>/dev/null

This unexpectedly outputs:

ls: non_existent_file: No such file or directory

No output should be printed since STDERR is being redirected to /dev/null.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Tool] Env/packages/env[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions