Update for feedback.
This commit is contained in:
parent
2e85f2beb2
commit
f97bce040f
@ -271,7 +271,7 @@ module Cask
|
||||
end
|
||||
|
||||
def uninstall_login_item(*login_items, command: nil, successor: nil, **_)
|
||||
return unless successor.nil?
|
||||
return if successor
|
||||
|
||||
apps = cask.artifacts.select { |a| a.class.dsl_key == :app }
|
||||
derived_login_items = apps.map { |a| { path: a.target } }
|
||||
|
||||
@ -43,7 +43,7 @@ module Cask
|
||||
|
||||
if Utils.path_occupied?(target)
|
||||
if !predecessor.nil? && target.directory? && target.children.empty? && predecessor.artifacts.any? do |a|
|
||||
a.class.dsl_key == self.class.dsl_key && a.target == target
|
||||
a.instance_of?(self.class) && instance_of?(a.class) && a.target == target
|
||||
end
|
||||
# An upgrade removed the directory contents but left the directory itself (see below).
|
||||
unless source.directory?
|
||||
@ -158,7 +158,7 @@ module Cask
|
||||
return unless Utils.path_occupied?(target)
|
||||
|
||||
if !successor.nil? && target.directory? && successor.artifacts.any? do |a|
|
||||
a.class.dsl_key == self.class.dsl_key && a.target == self.target
|
||||
a.instance_of?(self.class) && instance_of?(a.class) && a.target == self.target
|
||||
end
|
||||
# If an app folder is deleted, macOS considers the app uninstalled and removes some data.
|
||||
# Remove only the contents to handle this case.
|
||||
|
||||
@ -179,14 +179,13 @@ module Cask
|
||||
def self.copy_xattrs(from, to)
|
||||
odebug "Copying xattrs from #{from} to #{to}"
|
||||
|
||||
copier = system_command!(swift,
|
||||
args: [
|
||||
*swift_target_args,
|
||||
COPY_XATTRS_SCRIPT,
|
||||
from,
|
||||
to,
|
||||
])
|
||||
copier.success?
|
||||
system_command!(swift,
|
||||
args: [
|
||||
*swift_target_args,
|
||||
COPY_XATTRS_SCRIPT,
|
||||
from,
|
||||
to,
|
||||
])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user