You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
I had to update a test to wt --version 2>&1 so a check doesn't fail.
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.
Activity
fix: route `wt --version` output to stdout
worktrunk-bot commentedon Apr 11, 2026
Thanks for reporting this! Reproduced —
wt --versionwrites to stderr, but POSIX convention (and what scripts likeversion=$(wt --version)expect) is stdout. Only errors and diagnostics belong on stderr.Root cause: in
src/help.rs, clap'sDisplayVersionwas being rendered viaeprint\!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\!toprint\!, plus a regression test and an updated snapshot). A maintainer will review it shortly.max-sixty commentedon Apr 11, 2026
thanks @koralowiec !
feat(help): route --help and -h to stdout
Route --help output to stdout (#2155)
Prepare 0.37.0 release notes (#2175)