log errors in key bindings parsing (#1491)

This commit is contained in:
extrawurst 2023-01-29 11:15:19 +01:00
parent b424b9beeb
commit 32f6134309
2 changed files with 4 additions and 2 deletions

View File

@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `edit`-file command shown on commits msg ([#1461](https://github.com/extrawurst/gitui/issues/1461))
* crash on branches popup in small terminal ([#1470](https://github.com/extrawurst/gitui/issues/1470))
* `edit` command duplication ([#1489](https://github.com/extrawurst/gitui/issues/1489))
* syntax errors in `key_bindings.ron` will be logged ([#1491](https://github.com/extrawurst/gitui/issues/1491))
### Changed
* minimum supported rust version bumped to 1.64 (thank you `clap`)

View File

@ -205,8 +205,9 @@ impl Default for KeysList {
impl KeysList {
pub fn init(file: PathBuf) -> Self {
if file.exists() {
let file =
KeysListFile::read_file(file).unwrap_or_default();
let file = KeysListFile::read_file(file)
.map_err(|e| log::error!("key binding error: {e}",))
.unwrap_or_default();
file.get_list()
} else {
Self::default()