diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-05-12 19:36:10 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-05-12 19:55:06 -0500 |
commit | 86fbaaeb08e7fc35ee87daea62be7febacd14ea9 (patch) | |
tree | 8a4961453fc34c2164b3f046a77217ac78b14d4f | |
parent | 1643f4a1fc8a480c20ce972d9df47669111fff22 (diff) |
add bad_download error
-rw-r--r-- | src/rebar_fetch.erl | 2 | ||||
-rw-r--r-- | src/rebar_pkg_resource.erl | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl index 0bb2270..0aca308 100644 --- a/src/rebar_fetch.erl +++ b/src/rebar_fetch.erl @@ -65,6 +65,8 @@ needs_update(AppDir, Source, State) -> true end. +format_error({bad_download, CachePath}) -> + io_lib:format("Download of package does not match md5sum from server: ~s", [CachePath]); format_error({failed_extract, CachePath}) -> io_lib:format("Failed to extract package: ~s", [CachePath]); format_error({bad_etag, Source}) -> diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl index 8bbd963..f6bb29b 100644 --- a/src/rebar_pkg_resource.erl +++ b/src/rebar_pkg_resource.erl @@ -67,7 +67,7 @@ serve_from_download(TmpDir, CachePath, Package, ETag, Binary, State) -> ETag -> serve_from_cache(TmpDir, CachePath, Package, State); FileETag -> - ?DEBUG("Download ETag ~s doesn't match cached ETag ~s", [ETag, FileETag]), + ?DEBUG("Download ETag ~s doesn't match returned ETag ~s", [ETag, FileETag]), {bad_download, CachePath} end. |