Rustup: 'Component unavailable' error is formatted badly

Created on 4 Feb 2021  路  5Comments  路  Source: rust-lang/rustup

Problem

The error message is missing a newline.

Steps

> rustup component add miri
error: component 'miri' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel stableIf you don't need the component, you can remove it with:

    rustup component remove --toolchain stable --target x86_64-unknown-linux-gnu miri

Also, it seems odd that it suggests uninstalling a component that's not installed.

Notes

Output of rustup --version:

rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.49.0 (e1884a8e3 2020-12-29)`

Output of rustup show:

> rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/joshua/.local/lib/rustup

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

stable-x86_64-unknown-linux-gnu (default)
... lots of toolchains follow ...

installed targets for active toolchain
--------------------------------------

x86_64-pc-windows-gnu
x86_64-unknown-linux-gnu

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

stable-x86_64-unknown-linux-gnu (default)
rustc 1.49.0 (e1884a8e3 2020-12-29)
bug fixed-next-release

All 5 comments

Can I work on this? From my understanding the issue is in https://github.com/rust-lang/rustup/blob/master/src/errors.rs, line 428 and 440

That looks like the right place to look yes. There are a couple messages there which might need some attention.

Looks like this was already addressed by commit b045fb2c9817bb5436651bcfd2584936af4f0f15.

It's amazing how I can forget things that recent :( Thank you for finding that @danitrod

1.24.1 has now been released and hopefully won't need to be withdrawn.

Was this page helpful?
0 / 5 - 0 ratings