diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-08-23 16:44:58 +1200 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-08-23 16:44:58 +1200 |
commit | 691662c794401b1061164710cd35c9a1000e80a1 (patch) | |
tree | 9efe522403b2fb9fd284e6e6af488a4a6b7fa846 /src/rebar_pkg_resource.erl | |
parent | 070e9d329bcbae9a7912b7cd84af0a97bc1c3c19 (diff) | |
parent | 391959dae8540a96c1945082f3b62fbe46914800 (diff) |
Merge pull request #740 from tsloughter/hex_output
use 'default' for default hex repo path in cache and include in info messages
Diffstat (limited to 'src/rebar_pkg_resource.erl')
-rw-r--r-- | src/rebar_pkg_resource.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl index fdc69e2..3430e81 100644 --- a/src/rebar_pkg_resource.erl +++ b/src/rebar_pkg_resource.erl @@ -34,7 +34,7 @@ download(TmpDir, Pkg={pkg, Name, Vsn}, State) -> Url = string:join([CDN, Package], "/"), cached_download(TmpDir, CachePath, Pkg, Url, etag(CachePath), State). -cached_download(TmpDir, CachePath, Pkg, Url, ETag, State) -> +cached_download(TmpDir, CachePath, Pkg={pkg, Name, Vsn}, Url, ETag, State) -> case request(Url, ETag) of {ok, cached} -> serve_from_cache(TmpDir, CachePath, Pkg, State); @@ -44,7 +44,7 @@ cached_download(TmpDir, CachePath, Pkg, Url, ETag, State) -> ?DEBUG("Download ~s error, using ~s from cache", [Url, CachePath]), serve_from_cache(TmpDir, CachePath, Pkg, State); error -> - request_failed + {fetch_fail, Name, Vsn} end. serve_from_cache(TmpDir, CachePath, Pkg, State) -> |