feat(brew): adds "greedy-latest" option to Brew (#636)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user