Merge pull request #13369 from Bo98/quarantine-fix

cask/quarantine: fix quarantine not working under some setups
This commit is contained in:
Mike McQuaid 2022-06-03 14:44:16 +01:00 committed by GitHub
commit e8fcb6af09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,11 @@ module Cask
end
private :xattr
def swift_target_args
["-target", "#{Hardware::CPU.arch}-apple-macosx#{MacOS.version}"]
end
private :swift_target_args
sig { returns(Symbol) }
def check_quarantine_support
odebug "Checking quarantine support"
@ -39,7 +44,7 @@ module Cask
:no_swift
else
api_check = system_command(swift,
args: [QUARANTINE_SCRIPT],
args: [*swift_target_args, QUARANTINE_SCRIPT],
print_stderr: false)
case api_check.exit_status
@ -116,6 +121,7 @@ module Cask
quarantiner = system_command(swift,
args: [
*swift_target_args,
QUARANTINE_SCRIPT,
download_path,
cask.url.to_s,