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:
Ed Page 2021-05-14 14:06:15 -05:00
parent a0c592ff81
commit 1a1ff20f40

View file

@ -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() {