Skip :trash step if no paths exist

Fixes Homebrew/cask#63583
This commit is contained in:
L. E. Segovia 2019-05-21 12:56:23 +00:00
parent b3c0997c0a
commit a5fc2ec834
No known key found for this signature in database
GPG Key ID: D5D1DC48B52B7AD5

View File

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