From e7b1feefe8b14f144cdcf9a4617aaa8372407664 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 25 Oct 2018 01:05:53 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20remove=20login=20items=20on=20u?= =?UTF-8?q?pgrade.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/cask/artifact/abstract_uninstall.rb | 4 +++- Library/Homebrew/cask/installer.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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