Merge pull request #15968 from MikeMcQuaid/cask_upgrade_sudo_test_fix
cask/quarantine: don't try to sudo during tests.
This commit is contained in:
commit
d5d74788b2
@ -91,7 +91,7 @@ module Cask
|
||||
command.run!("/bin/cp", args: ["-pR", *source.children, target],
|
||||
sudo: true)
|
||||
end
|
||||
Quarantine.copy_xattrs(source, target)
|
||||
Quarantine.copy_xattrs(source, target, command: command)
|
||||
source.rmtree
|
||||
elsif target.dirname.writable?
|
||||
FileUtils.move(source, target)
|
||||
|
||||
@ -174,11 +174,11 @@ module Cask
|
||||
raise CaskQuarantinePropagationError.new(to, quarantiner.stderr)
|
||||
end
|
||||
|
||||
sig { params(from: Pathname, to: Pathname).void }
|
||||
def self.copy_xattrs(from, to)
|
||||
sig { params(from: Pathname, to: Pathname, command: T.class_of(SystemCommand)).void }
|
||||
def self.copy_xattrs(from, to, command:)
|
||||
odebug "Copying xattrs from #{from} to #{to}"
|
||||
|
||||
system_command!(
|
||||
command.run!(
|
||||
swift,
|
||||
args: [
|
||||
*swift_target_args,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user