Skip to content

Commit

Permalink
Handle missing outer checksum when formatting lock
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmj committed Feb 4, 2020
1 parent 8d3af62 commit 2beb43c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/hex/scm.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ defmodule Hex.SCM do
%{outer_checksum: <<checksum::binary-8, _::binary>>} = lock ->
"#{lock.version} (#{lock.repo}/#{lock.name}) #{checksum}"

%{outer_checksum: nil, repo: "hexpm"} = lock ->
"#{lock.version} (#{lock.name}) " <>
~s("Checksum missing in old lock, run mix deps.get to update")

%{outer_checksum: nil} = lock ->
"#{lock.version} (#{lock.repo}/#{lock.name}) " <>
~s("Checksum missing in old lock, run mix deps.get to update")

nil ->
nil
end
Expand Down

0 comments on commit 2beb43c

Please sign in to comment.