Merge pull request #13369 from Bo98/quarantine-fix
cask/quarantine: fix quarantine not working under some setups
This commit is contained in:
commit
e8fcb6af09
@ -27,6 +27,11 @@ module Cask
|
|||||||
end
|
end
|
||||||
private :xattr
|
private :xattr
|
||||||
|
|
||||||
|
def swift_target_args
|
||||||
|
["-target", "#{Hardware::CPU.arch}-apple-macosx#{MacOS.version}"]
|
||||||
|
end
|
||||||
|
private :swift_target_args
|
||||||
|
|
||||||
sig { returns(Symbol) }
|
sig { returns(Symbol) }
|
||||||
def check_quarantine_support
|
def check_quarantine_support
|
||||||
odebug "Checking quarantine support"
|
odebug "Checking quarantine support"
|
||||||
@ -39,7 +44,7 @@ module Cask
|
|||||||
:no_swift
|
:no_swift
|
||||||
else
|
else
|
||||||
api_check = system_command(swift,
|
api_check = system_command(swift,
|
||||||
args: [QUARANTINE_SCRIPT],
|
args: [*swift_target_args, QUARANTINE_SCRIPT],
|
||||||
print_stderr: false)
|
print_stderr: false)
|
||||||
|
|
||||||
case api_check.exit_status
|
case api_check.exit_status
|
||||||
@ -116,6 +121,7 @@ module Cask
|
|||||||
|
|
||||||
quarantiner = system_command(swift,
|
quarantiner = system_command(swift,
|
||||||
args: [
|
args: [
|
||||||
|
*swift_target_args,
|
||||||
QUARANTINE_SCRIPT,
|
QUARANTINE_SCRIPT,
|
||||||
download_path,
|
download_path,
|
||||||
cask.url.to_s,
|
cask.url.to_s,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user