diff options
| author | Larry Shaffer | 2014-02-06 13:00:32 -0700 |
|---|---|---|
| committer | Jack Nagel | 2014-08-24 23:26:36 -0500 |
| commit | 675e5d164eb95f120f3d375d07448971e73b5abf (patch) | |
| tree | 323ce497f0d3a48670a875f43c4cddf243017e98 /Library/Homebrew/download_strategy.rb | |
| parent | 5fc79ebf96102f3d8ede59077700e0f7fc701a68 (diff) | |
| download | homebrew-675e5d164eb95f120f3d375d07448971e73b5abf.tar.bz2 | |
Add friendlier local file missing error
Closes #26481.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
| -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) } |
