rustup icon indicating copy to clipboard operation
rustup copied to clipboard

Fails to add component on Windows

Open lnicola opened this issue 7 months ago • 11 comments

We're also seeing some breakage for rustup component add --toolchain nightly rustfmt, but only on Windows:

error: invalid value 'C:\Users\runneradmin\.cargo\bin\rustup.exe' for '[+toolchain]': error: "C:\Users\runneradmin\.cargo\bin\rustup.exe" is not a valid subcommand, so it was interpreted as a toolchain name, but it is also invalid. To override the toolchain using the 'rustup +toolchain' syntax, make sure to prefix the toolchain override with a '+'

It's similar, but not the same as marmeladema's error from above.

EDIT: this fixed it:

-          rustup toolchain add nightly --profile minimal
-          rustup component add --toolchain nightly rustfmt
+          rustup toolchain install nightly --profile minimal --component rustfmt

Originally posted by @lnicola in #4220

lnicola avatar Mar 05 '25 13:03 lnicola