I've installed rust via the 64bi rustup-init.exe. After a successful install, I changed the environment variable "path" to point to a C:\Program Files.cargo\bin and move the originally installed .cargo directory to this new location. After rebooting Windows 11, I fire up a command prompt and run 'rustup --version'. It all works as expected. However, when I type 'rustup update' I get the following error:
error: rustup is not installed at 'C:\Users\br15.cargo'
This was the original installation directory. I looks like rustup is getting the location of the rust binaries from an external source rather than using its execution directory.
Thanks for the reply. I added an environment variable for CARGO_HOME pointing to "C:\Program Files.cargo\bin". When I run rustup, I get the following output.
C:\Program Files.cargo\bin>rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
error: rustup is not installed at 'C:\Program Files.cargo\bin'
rustup says it can't find itself in the directory from which it is running?
I agree, it's a very generic error message. A hint that the $CARGO_HOME environment variable may not be set or pointing to the wrong directory would have been helpful. You could open an issue in the rustup repository.