The logic for finding whether the crates.io index had been source replaced was incorrect. If any valid config.toml was found, it would be probed for whether the source replacement key was defined, otherwise use the default and move on with initialization. This would mean if you did have source replacement enabled in a config.toml further up the chain, or in CARGO_HOME, it would not be resolved properly. This was resolved by combining the key reading with the hierarchy traversal, so that all valid configs are traversed until the first config that actually defines a valid source replacement is located.
The logic for finding whether the crates.io index had been source replaced was incorrect. If any valid config.toml was found, it would be probed for whether the source replacement key was defined, otherwise use the default and move on with initialization. This would mean if you did have source replacement enabled in a config.toml further up the chain, or in CARGO_HOME, it would not be resolved properly. This was resolved by combining the key reading with the hierarchy traversal, so that all valid configs are traversed until the first config that actually defines a valid source replacement is located.