aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Shaffer2014-02-06 13:00:32 -0700
committerJack Nagel2014-08-24 23:26:36 -0500
commitba8ef6a7ed65b5d4bbf3d92e57718faa85c3aaab (patch)
tree1d32fdd2dd3f66c38cc66c55642b9b1ea9671af1
parentccf37d5ac021ca098ed73e290ca518628b4a1aba (diff)
downloadbrew-ba8ef6a7ed65b5d4bbf3d92e57718faa85c3aaab.tar.bz2
Add friendlier local file missing error
Closes Homebrew/homebrew#26481. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Homebrew/download_strategy.rb7
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) }