Skip to content

Commit

Permalink
Merge pull request #4559 from rolandwalker/rescue_download_failure
Browse files Browse the repository at this point in the history
rescue download failure; don't show traceback
  • Loading branch information
rolandwalker committed May 26, 2014
2 parents 607d70a + f71ed25 commit 96d57c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cask/download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ def perform(force=false)
downloader = Cask::CurlDownloadStrategy.new(cask)
end
downloader.clear_cache if force
downloaded_path = downloader.fetch
begin
downloaded_path = downloader.fetch
rescue StandardError
raise CaskError.new("Download failed on Cask '#{@cask}'")
end
begin
# this symlink helps track which downloads are ours
File.symlink downloaded_path,
Expand Down

0 comments on commit 96d57c6

Please sign in to comment.