diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 6c5e295539..411c970811 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -169,7 +169,9 @@ module Cask end end - def uninstall_login_item(*login_items, command: nil, **_) + def uninstall_login_item(*login_items, command: nil, upgrade: false, **_) + return if upgrade + login_items.each do |name| ohai "Removing login item #{name}" command.run!( diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 255283cd76..20609203fb 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -424,7 +424,7 @@ module Cask next unless artifact.respond_to?(:uninstall_phase) odebug "Un-installing artifact of class #{artifact.class}" - artifact.uninstall_phase(command: @command, verbose: verbose?, skip: clear, force: force?) + artifact.uninstall_phase(command: @command, verbose: verbose?, skip: clear, force: force?, upgrade: upgrade?) end end