Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- Removed the no longer valid `quarantine` options from the `brew` backend
(reported in #224, fixed in #225).

## [0.9.3] - 2026-01-28

### Fixed
Expand Down
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,6 @@ server = ["relative_group"]
# Default: "pacman"
package_manager = "paru"

[brew]
# If this is `true` then brew packages default to using the `--quarantine`
# option.
# If this is `false` then brew packages default to using the `--no-quarantine`
# option.
# Default: true
quarantine = true

[cargo]
# Whether to default to installing cargo packages with the `--locked` option.
# Default: false
Expand Down Expand Up @@ -450,12 +442,7 @@ arch = {
},
]
}
brew = {
packages = [
"package1",
{ name = "package2", options = { quarantine = false } }
]
}
brew = { packages = ["package1", { name = "package2" }] }
bun = { packages = ["package1", { name = "package2" }] }
cargo = {
packages = [
Expand Down
34 changes: 7 additions & 27 deletions src/backends/brew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,13 @@ use serde_inline_default::serde_inline_default;
pub struct Brew;

#[serde_inline_default]
#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Default)]
#[serde(deny_unknown_fields)]
pub struct BrewConfig {
#[serde_inline_default(BrewConfig::default().quarantine)]
quarantine: bool,
}
impl Default for BrewConfig {
fn default() -> Self {
Self { quarantine: true }
}
}
pub struct BrewConfig {}

#[derive(Debug, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct BrewPackageOptions {
quarantine: Option<bool>,
}
pub struct BrewPackageOptions {}

#[derive(Debug, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
Expand Down Expand Up @@ -72,28 +62,18 @@ impl Backend for Brew {
Ok(formulae
.lines()
.chain(casks.lines())
.map(|x| (x.to_string(), Self::PackageOptions { quarantine: None }))
.map(|x| (x.to_string(), Self::PackageOptions {}))
.collect())
}

fn install_packages(
packages: &BTreeMap<String, Self::PackageOptions>,
_: bool,
config: &Self::Config,
_: &Self::Config,
) -> Result<()> {
for (package, options) in packages {
for package in packages.keys() {
run_command(
[
"brew",
"install",
if options.quarantine.unwrap_or(config.quarantine) {
"--quarantine"
} else {
"--no-quarantine"
},
package.as_str(),
]
.into_iter(),
["brew", "install", package.as_str()].into_iter(),
Perms::Same,
)?;
}
Expand Down
Loading