Skip to content

wt --version outputs to stderr #2072

Closed

Description

@koralowiec

Heyo, I tried to package wt as devcontainer feature in devcontainers-extra/features#212 and I noticed that wt --version outputs to stderr. Shouldn't that go to stdout?

Image

I had to update a test to wt --version 2>&1 so a check doesn't fail.

Activity

  1. added a commit that references this issue on Apr 11, 2026
    0152051
  2. worktrunk-bot commented on Apr 11, 2026

    @worktrunk-bot
    Collaborator

    Thanks for reporting this! Reproduced — wt --version writes to stderr, but POSIX convention (and what scripts like version=$(wt --version) expect) is stdout. Only errors and diagnostics belong on stderr.

    Root cause: in src/help.rs, clap's DisplayVersion was being rendered via eprint\! with a comment claiming "stdout is reserved for data/scripts" — but version output is data that scripts consume.

    I've opened #2073 with the fix (one-line change from eprint\! to print\!, plus a regression test and an updated snapshot). A maintainer will review it shortly.

  3. max-sixty commented on Apr 11, 2026

    @max-sixty
    Owner

    thanks @koralowiec !

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions