Skip to content

[BUG] stdlib: input() loses piped input after the first line #7198

Closed

Description

@xvbcfj

Bug description

def main() raises:
    print(input())
    print(input())
❯ printf 'a\nb\n' | pixi run mojo t.mojo
a
stack trace was not collected. Enable stack trace collection with environment variable `MODULAR_DEBUG=stack-trace-on-error`
Unhandled exception caught during execution: EOF

Steps to reproduce

See above

System information

❯ pixi run mojo -v     
Mojo 1.2.0.dev2026092805 (14194832)

Activity

  1. added
    bug
    mojo
    needs: triage
    on Sep 28, 2026
  2. added
    Team: Mojo Libraries
    and removed
    needs: triage
    on Sep 28, 2026
  3. added a commit that references this issue on Oct 24, 2026
    a2da960
  4. added a commit that references this issue on Nov 11, 2026
    da02051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team: Mojo Librariesbugbug_feature_triagedmojo

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions