diff --git a/lib/bundle/brew_installer.rb b/lib/bundle/brew_installer.rb index c21f4a553..02499ab8d 100644 --- a/lib/bundle/brew_installer.rb +++ b/lib/bundle/brew_installer.rb @@ -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:)