feat: add fetch_head configuration option into brew (#679)

This commit is contained in:
Wallunen
2024-02-06 10:17:27 +02:00
committed by GitHub
parent 7007e76ab5
commit 77a8b3b7d2
3 changed files with 22 additions and 4 deletions

View File

@@ -285,10 +285,15 @@ pub fn run_brew_formula(ctx: &ExecutionContext, variant: BrewVariant) -> Result<
let run_type = ctx.run_type();
variant.execute(run_type).arg("update").status_checked()?;
variant
.execute(run_type)
.args(["upgrade", "--formula"])
.status_checked()?;
let mut command = variant.execute(run_type);
command.args(["upgrade", "--formula"]);
if ctx.config().brew_fetch_head() {
command.arg("--fetch-HEAD");
}
command.status_checked()?;
if ctx.config().cleanup() {
variant.execute(run_type).arg("cleanup").status_checked()?;