Skip to content

Commit

Permalink
address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Paxton committed Feb 4, 2020
1 parent 3b3dd71 commit 8a590bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/rebar_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ read_attrs(_Vsn, Locks, Attrs) ->
expand_locks(Locks, OldHashes, NewHashes).

%% @private extract the package hashes from lockfile attributes, if any.
-spec extract_pkg_hashes(list()) -> [binary()].
-spec extract_pkg_hashes(list()) -> {[binary()], [binary()]}.
extract_pkg_hashes(Attrs) ->
Props = case Attrs of
[First|_] -> First;
Expand Down Expand Up @@ -190,8 +190,8 @@ write_attrs(Locks) ->
%% No attribute known that needs to be taken out of the structure,
%% just return terms as is.
{NewLocks, OldHashes, NewHashes} = split_locks(Locks, [], [], []),
case OldHashes ++ NewHashes of
[] -> {NewLocks, []};
case {OldHashes, NewHashes} of
{[], []} -> {NewLocks, []};
_ ->
{NewLocks, [{pkg_hash, lists:sort(OldHashes)}, {pkg_hash_ext, lists:sort(NewHashes)}]}
end.
Expand Down
2 changes: 1 addition & 1 deletion src/rebar_pkg_resource.erl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ serve_from_memory(TmpDir, Binary, {pkg, _Name, _Vsn, OldHash, Hash, _RepoConfig}
?DEBUG("Expected hash ~64.16.0B does not match outer checksum of fetched package ~64.16.0B, but
matches inner checksum ~64.16.0B",
[RegistryChecksum, Checksum, OldChecksum]),
ok;
{bad_registry_checksum, RegistryChecksum, OldChecksum};
false ->
?DEBUG("Expected hash ~64.16.0B does not match outer checksum or inner checksum of fetched package
~64.16.0B / ~64.16.0B", [RegistryChecksum, Checksum, OldChecksum]),
Expand Down

0 comments on commit 8a590bc

Please sign in to comment.