Closed
Description
Problem
In #6026, the behavior of cargo install
was changed to ignore any.cargo/config.toml
configuration in the current working directory. It seems like this behavior does not apply to the new unstable
table in that config file.
Steps
- Create a
.cargo/config.toml
file with the following content:
[unstable]
build-std = ["core"]
- Try to install a crate from crates.io, e.g.
cargo install bootimage
. - This results in a
-Zbuild-std requires --target
error. - Switching to the parent directory fixes the problem because then the
.cargo/config
file no longer applies.
Possible Solution(s)
The unstable
table should behave the same as the other .cargo/config.toml
configuration keys and be ignored for cargo install
. Only configuration files in the home directory and the --path
directory should be considered.
Notes
Output of cargo version
:
cargo 1.46.0-nightly (43cf773 2020-07-13)
release: 1.46.0
commit-hash: 43cf773
commit-date: 2020-07-13
Originally reported by @Asoftyn in rust-osdev/bootimage#64.