mirror of
https://github.com/crate-ci/typos.git
synced 2026-10-18 18:05:11 +02:00
fix(cli): Discover config in parent dirs
My only guess is that in a76ddd42, I lost track of different parts of my
change and never re-implemented this logic.
This commit is contained in:
+5
-2
@@ -123,8 +123,11 @@ impl<'s> ConfigEngine<'s> {
|
||||
let mut config = crate::config::Config::default();
|
||||
|
||||
if !self.isolated {
|
||||
if let Some(derived) = crate::config::Config::from_dir(cwd)? {
|
||||
config.update(&derived);
|
||||
for ancestor in cwd.ancestors() {
|
||||
if let Some(derived) = crate::config::Config::from_dir(ancestor)? {
|
||||
config.update(&derived);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(overrides) = self.overrides.as_ref() {
|
||||
|
||||
Reference in New Issue
Block a user