Merge pull request #6158 from amyspark/fix-empty-trashing

Skip :trash step if no paths exist
This commit is contained in:
Mike McQuaid 2019-05-21 21:53:13 +01:00 committed by GitHub
commit 0ff2afdfa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,6 +320,8 @@ module Cask
end
def trash_paths(*paths, command: nil, **_)
return if paths.empty?
result = command.run!("/usr/bin/swift", args: [TRASH_SCRIPT, *paths])
# Remove AppleScript's automatic newline.