Skip to content

Commit

Permalink
fix(config): gracefully handled deprecated asc opt
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LGUG2Z committed Apr 5, 2024
1 parent 6238d1f commit 6aa9be1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions komorebi-core/src/config_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub enum ApplicationOptions {
Layered,
TrayAndMultiWindow,
Force,
BorderOverflow,
}

impl ApplicationOptions {
Expand All @@ -36,6 +37,9 @@ impl ApplicationOptions {
ApplicationOptions::Force => {
format!("komorebic.exe manage-rule {kind} \"{id}\"")
}
ApplicationOptions::BorderOverflow => {
unreachable!("deprecated");
}
}
}

Expand Down
1 change: 1 addition & 0 deletions komorebi/src/static_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ impl StaticConfig {
&mut regex_identifiers,
)?;
}
ApplicationOptions::BorderOverflow => {} // deprecated
}
}
}
Expand Down

0 comments on commit 6aa9be1

Please sign in to comment.