abstract_uninstall: add timeout to trash_paths

This commit is contained in:
Steven Peters 2019-05-08 11:29:37 -07:00 committed by L. E. Segovia
parent d6bd271986
commit 1406ee7eac

View File

@ -324,6 +324,8 @@ module Cask
set item i of argv to (item i of argv as POSIX file)
end repeat
try
with timeout of 30 seconds
tell application "Finder"
set trashedItems to (move argv to trash)
set output to ""
@ -338,6 +340,11 @@ module Cask
return output
end tell
end timeout
on error
-- Ignore errors (probably running under Azure)
return 0
end try
end run
APPLESCRIPT