These files cannot be trashed from CLI without sudo, which trashes them
instead to root's Trash. AppleScript isn't of use here because it will
break Travis (as it will fail when asking for admin permissions).
Fixeshomebrew/homebrew-cask#69897
- In some cases (usually old CLT versions) Swift is available but needs an
extra guard to use the quarantine API.
- xattr's native filesystem recursion is an Apple extension which is
not available in Mojave; so let's use xargs.
- Insert a quarantine support check in brew cask doctor.
FixesHomebrew/homebrew-cask#51554, and fixesHomebrew/homebrew-cask#51538.