use absolute path for config.toml

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2024-08-08 15:06:43 +03:00
parent a7c415c67f
commit ff0d37cb01

View file

@ -1325,7 +1325,11 @@ impl Config {
// Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
// but not if `config.toml` hasn't been created.
let mut toml = if !using_default_path || toml_path.exists() {
config.config = Some(toml_path.clone());
config.config = Some(if cfg!(not(feature = "bootstrap-self-test")) {
toml_path.canonicalize().unwrap()
} else {
toml_path.clone()
});
get_toml(&toml_path)
} else {
config.config = None;