Don’t remove login items on upgrade.

This commit is contained in:
Markus Reiter 2018-10-25 01:05:53 +02:00
parent a4c62d37b1
commit e7b1feefe8
2 changed files with 4 additions and 2 deletions

View File

@ -169,7 +169,9 @@ module Cask
end end
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| login_items.each do |name|
ohai "Removing login item #{name}" ohai "Removing login item #{name}"
command.run!( command.run!(

View File

@ -424,7 +424,7 @@ module Cask
next unless artifact.respond_to?(:uninstall_phase) next unless artifact.respond_to?(:uninstall_phase)
odebug "Un-installing artifact of class #{artifact.class}" 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
end end