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],
|
command.run!("/bin/cp", args: ["-pR", *source.children, target],
|
||||||
sudo: true)
|
sudo: true)
|
||||||
end
|
end
|
||||||
Quarantine.copy_xattrs(source, target)
|
Quarantine.copy_xattrs(source, target, command: command)
|
||||||
source.rmtree
|
source.rmtree
|
||||||
elsif target.dirname.writable?
|
elsif target.dirname.writable?
|
||||||
FileUtils.move(source, target)
|
FileUtils.move(source, target)
|
||||||
|
|||||||
@ -174,11 +174,11 @@ module Cask
|
|||||||
raise CaskQuarantinePropagationError.new(to, quarantiner.stderr)
|
raise CaskQuarantinePropagationError.new(to, quarantiner.stderr)
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { params(from: Pathname, to: Pathname).void }
|
sig { params(from: Pathname, to: Pathname, command: T.class_of(SystemCommand)).void }
|
||||||
def self.copy_xattrs(from, to)
|
def self.copy_xattrs(from, to, command:)
|
||||||
odebug "Copying xattrs from #{from} to #{to}"
|
odebug "Copying xattrs from #{from} to #{to}"
|
||||||
|
|
||||||
system_command!(
|
command.run!(
|
||||||
swift,
|
swift,
|
||||||
args: [
|
args: [
|
||||||
*swift_target_args,
|
*swift_target_args,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user