瀏覽代碼

add bad_download error

pull/414/head
Tristan Sloughter 10 年之前
父節點
當前提交
86fbaaeb08
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. +2
    -0
      src/rebar_fetch.erl
  2. +1
    -1
      src/rebar_pkg_resource.erl

+ 2
- 0
src/rebar_fetch.erl 查看文件

@ -65,6 +65,8 @@ needs_update(AppDir, Source, State) ->
true true
end. 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}) -> format_error({failed_extract, CachePath}) ->
io_lib:format("Failed to extract package: ~s", [CachePath]); io_lib:format("Failed to extract package: ~s", [CachePath]);
format_error({bad_etag, Source}) -> format_error({bad_etag, Source}) ->

+ 1
- 1
src/rebar_pkg_resource.erl 查看文件

@ -67,7 +67,7 @@ serve_from_download(TmpDir, CachePath, Package, ETag, Binary, State) ->
ETag -> ETag ->
serve_from_cache(TmpDir, CachePath, Package, State); serve_from_cache(TmpDir, CachePath, Package, State);
FileETag -> 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} {bad_download, CachePath}
end. end.

Loading…
取消
儲存