Ensure that fn config_path returns canonicalized paths.#6272
Ensure that fn config_path returns canonicalized paths.#6272ytmimi merged 1 commit intorust-lang:masterfrom
fn config_path returns canonicalized paths.#6272Conversation
|
Thanks for the PR. Would you mind double checking if there's any difference in the output when running Output should look something like this: |
There are no output changes in this scenario. Before the changes: After the changes: As expected the path passed to Before the changes: After the changes: |
|
Thanks for double checking. I figured that the behavior would change slightly and wanted to confirm that. Edit: Diff Check Job passed ✅ |
This commit ensures that `fn config_path` in `rustfmt/src/config/mod.rs` always returns canonicalized paths. This is achieved by canonicalizing both: 1) paths received via `CliOptions` (after checking if the path exists) as well as 2) paths returned via `get_toml_path` (canonicalizing within `fn get_toml_path`). Fixes rust-lang#6178
This commit ensures that
fn config_pathinrustfmt/src/config/mod.rsalways returns canonicalized paths. This is achieved by canonicalizing both: 1) paths received viaCliOptions(after checking if the path exists) as well as 2) paths returned viaget_toml_path(canonicalizing withinfn get_toml_path).Fixes #6178