feat(brew): adds "greedy-latest" option to Brew (#636)

This commit is contained in:
luciodaou
2024-02-17 00:45:57 -03:00
committed by GitHub
parent 7a3f3a8905
commit 8991bc9f62
3 changed files with 14 additions and 0 deletions

View File

@@ -254,6 +254,7 @@ pub struct Flatpak {
#[serde(deny_unknown_fields)]
pub struct Brew {
greedy_cask: Option<bool>,
greedy_latest: Option<bool>,
autoremove: Option<bool>,
fetch_head: Option<bool>,
}
@@ -1089,6 +1090,15 @@ impl Config {
.unwrap_or(false)
}
/// Whether Brew cask should be greedy_latest
pub fn brew_greedy_latest(&self) -> bool {
self.config_file
.brew
.as_ref()
.and_then(|c| c.greedy_latest)
.unwrap_or(false)
}
/// Whether Brew should autoremove
pub fn brew_autoremove(&self) -> bool {
self.config_file