mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-25 10:31:02 -05: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:
parent
a0c592ff81
commit
1a1ff20f40
1 changed files with 5 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue