summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/fetch-player-dependencies.cr3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/fetch-player-dependencies.cr b/scripts/fetch-player-dependencies.cr
index c24b6e0f..ba4c97aa 100644
--- a/scripts/fetch-player-dependencies.cr
+++ b/scripts/fetch-player-dependencies.cr
@@ -91,7 +91,8 @@ dependencies_to_install.each do |dep|
data = response.body_io.gets_to_end
File.write("#{download_path}/package.tgz", data)
- if Digest::SHA1.hexdigest(data) != required_dependencies[dep]["shasum"]
+ # https://github.com/iv-org/invidious/pull/2397#issuecomment-922375908
+ if `sha1sum #{download_path}/package.tgz`.split(" ")[0] != required_dependencies[dep]["shasum"]
raise Exception.new("Checksum for '#{dep}' failed")
end
end