From 3b22352d0d16034e112e58b032f1bf0fc1c818ba Mon Sep 17 00:00:00 2001 From: bhould287 Date: Sat, 1 Apr 2023 21:29:05 +0100 Subject: [PATCH] Fix bug with getting parent directories in `lookup_conf_file` --- clippy_lints/src/utils/conf.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index 25626897b51..896a01af37d 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -478,7 +478,8 @@ pub fn lookup_conf_file() -> io::Result<(Option, Vec)> { // If neither of those exist, use ".". let mut current = env::var_os("CLIPPY_CONF_DIR") .or_else(|| env::var_os("CARGO_MANIFEST_DIR")) - .map_or_else(|| PathBuf::from("."), PathBuf::from); + .map_or_else(|| PathBuf::from("."), PathBuf::from) + .canonicalize()?; let mut found_config: Option = None; let mut warnings = vec![];