fix(cosmic_config): treat errors getting key_path in get_local as NotFound
This commit is contained in:
parent
ccc1068d9f
commit
cd8f4ee859
1 changed files with 2 additions and 2 deletions
|
|
@ -329,8 +329,8 @@ impl ConfigGet for Config {
|
|||
|
||||
fn get_local<T: DeserializeOwned>(&self, key: &str) -> Result<T, Error> {
|
||||
// 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))?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue