Skip to content

Commit

Permalink
brew_installer: fail if services or link fails.
Browse files Browse the repository at this point in the history
This is the more expected behaviour and more consistent with e.g.
`brew bundle check`.
  • Loading branch information
MikeMcQuaid committed Jan 8, 2025
1 parent d01ca93 commit 37f0345
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/bundle/brew_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ def install(preinstall: true, no_upgrade: false, verbose: false, force: false)
else
true
end
result = install_result

if installed?
service_change_state!(verbose:) if install_result
link_change_state!(verbose:)
if install_result
service_result = service_change_state!(verbose:)
result &&= service_result
end
link_result = link_change_state!(verbose:)
result &&= link_result
end

install_result
result
end

def install_change_state!(no_upgrade:, verbose:, force:)
Expand Down

0 comments on commit 37f0345

Please sign in to comment.