Fix bug with getting parent directories in lookup_conf_file

This commit is contained in:
bhould287 2023-04-01 21:29:05 +01:00
parent 9e53b6544f
commit 3b22352d0d
No known key found for this signature in database
GPG Key ID: F57D90F0DC82CCD4

View File

@ -478,7 +478,8 @@ pub fn lookup_conf_file() -> io::Result<(Option<PathBuf>, Vec<String>)> {
// 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<PathBuf> = None;
let mut warnings = vec![];