From cd8f4ee8590170f09ba3c90542be92daaba38e87 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Fri, 14 Feb 2025 22:39:09 +0100 Subject: [PATCH] fix(cosmic_config): treat errors getting key_path in get_local as NotFound --- cosmic-config/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cosmic-config/src/lib.rs b/cosmic-config/src/lib.rs index 0a3e0c9e..357625e1 100644 --- a/cosmic-config/src/lib.rs +++ b/cosmic-config/src/lib.rs @@ -329,8 +329,8 @@ impl ConfigGet for Config { fn get_local(&self, key: &str) -> Result { // If key path exists - match self.key_path(key)? { - key_path if key_path.is_file() => { + match self.key_path(key) { + Ok(key_path) if key_path.is_file() => { // Load user override let data = fs::read_to_string(key_path) .map_err(|err| Error::GetKey(key.to_string(), err))?;