rustup icon indicating copy to clipboard operation
rustup copied to clipboard

error messages often written to stdout rather than stderr

Open mcandre opened this issue 2 years ago • 1 comments

Problem

When rustup emits error messages, these sometimes appear on the stdout stream, instead of the stderr stream. This makes it harder for aggregate CLI commands to distinguish between logs (such as lists of target triples) vs. error messages.

Steps

  1. Run rustup target list foo with and without redirecting stdout to a null stream.

Possible Solution(s)

Ensure that all error messages write to the stderr stream, rather than stdout.

Notes

No response

Rustup version

rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.68.2 (9eb3afe9e 2023-03-27)`

Installed toolchains

Default host: aarch64-apple-darwin
rustup home:  /Users/andrew/.asdf/installs/rust/1.68.2

installed toolchains
--------------------

1.68.2-aarch64-apple-darwin (default)
1.68.2-x86_64-unknown-linux-gnu

active toolchain
----------------

1.68.2-aarch64-apple-darwin (default)
rustc 1.68.2 (9eb3afe9e 2023-03-27)

mcandre avatar Apr 01 '23 22:04 mcandre