From 6aa9be1ea016e93684eff9c5e3cbbddee0c24fbd Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 5 Apr 2024 15:14:29 -0700 Subject: [PATCH] fix(config): gracefully handled deprecated asc opt This commit ensures that if an applications.yaml revision is passed which includes the now-deprecated border_overflow option, komorebi will gracefully handle it instead of crashing on an unknown enum variant error. --- komorebi-core/src/config_generation.rs | 4 ++++ komorebi/src/static_config.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/komorebi-core/src/config_generation.rs b/komorebi-core/src/config_generation.rs index abb593c1..6a69a53d 100644 --- a/komorebi-core/src/config_generation.rs +++ b/komorebi-core/src/config_generation.rs @@ -18,6 +18,7 @@ pub enum ApplicationOptions { Layered, TrayAndMultiWindow, Force, + BorderOverflow, } impl ApplicationOptions { @@ -36,6 +37,9 @@ impl ApplicationOptions { ApplicationOptions::Force => { format!("komorebic.exe manage-rule {kind} \"{id}\"") } + ApplicationOptions::BorderOverflow => { + unreachable!("deprecated"); + } } } diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index badcf71d..2b8d1116 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -599,6 +599,7 @@ impl StaticConfig { &mut regex_identifiers, )?; } + ApplicationOptions::BorderOverflow => {} // deprecated } } }