diff --git a/peach-lib/src/config_manager.rs b/peach-lib/src/config_manager.rs index 600899c..49d6d38 100644 --- a/peach-lib/src/config_manager.rs +++ b/peach-lib/src/config_manager.rs @@ -132,7 +132,10 @@ pub fn save_peach_config_to_disc( peach_config: HashMap, ) -> Result, PeachError> { // use a file lock to avoid race conditions while saving config - let mut lock = LockFile::open(&*LOCK_FILE_PATH)?; + let mut lock = LockFile::open(&*LOCK_FILE_PATH).map_err(|source| PeachError::Read { + source, + path: LOCK_FILE_PATH.to_string(), + })?; lock.lock()?; // first convert Hashmap to BTreeMap (so that keys are saved in deterministic alphabetical order)