Skip to content

rustup-init prioritizes existing/restored settings.toml file over user input #4054

@jonathanpallant

Description

@jonathanpallant

Problem you are trying to solve

If you have a Aarch64 Apple machine where you've never installed Rust, but have managed to restore the .rustup folder from a backup of an x86-64 machine that did have Rust installed, the rustup installer will detect you have an aarch64-apple-darwin machine by parsing the uname correctly, but then switch to installing the x86_64-apple-darwin version of the toolchain. This is unexpected, and hard to spot as it will mostly work - except when you later try and link against some C libraries and it rejects the Aarch64 libraries you give it.

1) Proceed with standard installation (default - just press enter)
2) Customize installation
3) Cancel installation
>

info: profile set to 'default'
info: default host triple is aarch64-apple-darwin
info: syncing channel updates for 'stable-x86_64-apple-darwin'
...
info: default toolchain set to 'stable-x86_64-apple-darwin'

Solution you'd like

The installer should spot that a .rustup/settings.toml file exists, and print a message to explain that it is not installing the toolchain for the detected target, but instead the one it was asked to install in the configuration file.

Notes

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions