summaryrefslogtreecommitdiff
path: root/src/rebar_fetch.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-06-22 12:44:17 -0400
committerGitHub <noreply@github.com>2016-06-22 12:44:17 -0400
commitfeed75ca91423be8eaf49e1db57a5ef605238aed (patch)
tree4cfdb045ad1f8eab45a583a95ad297edfc444f51 /src/rebar_fetch.erl
parent4fd419528186cb399f5cbeec7051afa89e7bbf3c (diff)
parent71df9bf1411c04e2f7dae7e9f0352180664b9365 (diff)
Merge pull request #1207 from ferd/pkg-local-hash-lock
lock file contains expected hash for pkg dependencies
Diffstat (limited to 'src/rebar_fetch.erl')
-rw-r--r--src/rebar_fetch.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl
index b80c125..47bfe1d 100644
--- a/src/rebar_fetch.erl
+++ b/src/rebar_fetch.erl
@@ -67,6 +67,12 @@ needs_update(AppDir, Source, State) ->
format_error({bad_download, CachePath}) ->
io_lib:format("Download of package does not match md5sum from server: ~s", [CachePath]);
+format_error({unexpected_hash, CachePath, Expected, Found}) ->
+ io_lib:format("The checksum for package at ~s (~s) does not match the "
+ "checksum previously locked (~s). Either unlock or "
+ "upgrade the package, or make sure you fetched it from "
+ "the same index from which it was initially fetched.",
+ [CachePath, Found, Expected]);
format_error({failed_extract, CachePath}) ->
io_lib:format("Failed to extract package: ~s", [CachePath]);
format_error({bad_etag, Source}) ->