Skip to content

[lit] Builtin cat does not read stdin for a "-" operand #240058

Description

@thejesh23

lit's builtin cat treats a - operand as a file name instead of standard input, unlike POSIX cat. A RUN line such as

# RUN: echo foo | cat - %t

fails with [Errno 2] No such file or directory: '-'.

Found with help from Claude Code. I reproduced and reviewed it myself.

Fix: #240060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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