rustup icon indicating copy to clipboard operation
rustup copied to clipboard

when install rust with latest rust-init, it link all .cargo/bin files to rustup, including cargo

Open oyealex opened this issue 1 year ago • 6 comments

Verification

  • [x] I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue and found no duplicates.
  • [x] I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.

Problem

when install rust with latest rust-init, it link all .cargo/bin files to rustup, including cargo

Image

Steps

  1. download latest rust-init file from rust website.
  2. config CARGO_HOMT and RUSTUP_HOME env to other dir.
  3. execute rust-init and complete the installration.

Possible Solution(s)

manually change the link target to the actived toolchain/bin/*.exe

Notes

No response

Rustup version

rustup 1.28.2 (e4f3ad6f8 2025-04-28)

Installed toolchains

stable-x86_64-pc-windows-msvc

OS version

windows 10 22H2

oyealex avatar Nov 19 '25 18:11 oyealex

I try to uninstall the only one toolchain, delete all .cargo/bin/*.exe exclude rustup, and install it again, it goes like:

Image

oyealex avatar Nov 19 '25 18:11 oyealex

Why do you think this is a problem?

djc avatar Nov 19 '25 19:11 djc

Why do you think this is a problem?

is not it wrong? when i execute cargo command in rust project, i got this error:

Image

oyealex avatar Nov 20 '25 15:11 oyealex

I think it should link to the exe file in the actived toolchain/bin, but it link all to the rustup.exe file,

oyealex avatar Nov 20 '25 15:11 oyealex

@oyealex Are you using a very old version of Cygwin? This is a known bug in Cygwin if this is the case: https://github.com/rust-lang/rustup/issues/4239

The solution is to update Cygwin to a newer version without the bug.

PS: Every thing being linked to rustup is the to how rustup works, so there’s no problem in that.

rami3l avatar Nov 20 '25 16:11 rami3l

@rami3l Thanks, I got the same error with #4239 , and the problem is resolved. 👍

oyealex avatar Nov 21 '25 14:11 oyealex