Skip to content

Commit

Permalink
fix: add update for brew and restart after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Jan 16, 2025
1 parent 3270dc2 commit 6a4a566
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 6a4a566

Please sign in to comment.