mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-26 16:52:12 +05:30
Improve error message for checksum failure
This commit is contained in:
parent
34ae6f4aa2
commit
dfd94f4f2e
@ -116,8 +116,11 @@ class Dependency
|
|||||||
end
|
end
|
||||||
|
|
||||||
private def validate_checksum(io)
|
private def validate_checksum(io)
|
||||||
if !CONFIG.skip_checksum && Digest::SHA1.hexdigest(io) != @config.shasum
|
return if CONFIG.skip_checksum
|
||||||
raise IO::Error.new("Checksum for '#{@dependency}' failed")
|
|
||||||
|
digest = Digest::SHA1.hexdigest(io)
|
||||||
|
if digest != @config.shasum
|
||||||
|
raise IO::Error.new("Checksum for '#{@dependency}' failed. \"#{digest}\" does not match configured \"#{@config.shasum}\"")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user