Skip to content

Commit

Permalink
Merge pull request #101 from algorandfoundation/fix/upgrade-brew
Browse files Browse the repository at this point in the history
fix: add update for brew
  • Loading branch information
PhearZero authored Jan 20, 2025
2 parents ed68da4 + 6a4a566 commit 34e5df1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions internal/algod/mac/mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,19 @@ func Upgrade(force bool) error {
if !system.CmdExists("brew") {
return errors.New("homebrew is not installed")
}

return system.RunAll(system.CmdsList{
err := system.RunAll(system.CmdsList{
{"brew", "--prefix", "algorand", "--installed"},
{"brew", "update"},
{"brew", "upgrade", "algorand", "--formula"},
})
if err != nil {
return err
}
err = Stop(false)
if err != nil {
return err
}
return Start(false)
}

// Start algorand with launchd
Expand Down

0 comments on commit 34e5df1

Please sign in to comment.