diff options
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index e7478bb4f..e6ce3729f 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -113,7 +113,12 @@ class CurlDownloadStrategy < AbstractDownloadStrategy had_incomplete_download = false retry else - raise CurlDownloadStrategyError, "Download failed: #{@url}" + if @url =~ %r[^file://] + msg = "File does not exist: #{@url.sub(%r[^file://], "")}" + else + msg = "Download failed: #{@url}" + end + raise CurlDownloadStrategyError, msg end end ignore_interrupts { temporary_path.rename(tarball_path) } |
