Skip to content

Commit

Permalink
fix issue with brew upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwrossiter committed Nov 28, 2024
1 parent 28a8a5e commit e31630a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mordecai/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

const (
version = "v0.0.28"
version = "v0.0.29"

githubAPI = "https://api.github.com/repos/codeyarduk/mordecai/releases/latest"
)
Expand Down
7 changes: 7 additions & 0 deletions cmd/mordecai/versioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ func updateVersion() error {

switch methodOfInstallation {
case "brew":
// First run brew update
updateCmd := exec.Command("brew", "update")
updateOutput, err := updateCmd.CombinedOutput()
if err != nil {
fmt.Printf("Error updating Homebrew: %v\n%s", err, updateOutput)
return err
}
cmd = exec.Command("brew", "upgrade", "mordecai")
updateMessage = "Successfully updated Mordecai using Brew"
case "curl":
Expand Down

0 comments on commit e31630a

Please sign in to comment.