From ac7a1bf7755362ff28da424e4251478010a53c2e Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Fri, 10 Nov 2023 23:12:08 +0800 Subject: [PATCH] utils/curl: fix `Digest::SHA256` typo Should fix the error seen in Homebrew/homebrew-core#153647 [^1]. This was introduced in e5d656bcce8 and `Digest::256` seems to be the intended one. [^1]: https://github.com/Homebrew/homebrew-core/actions/runs/6805354565/job/18504732312?pr=153647#step:4:36 --- Library/Homebrew/utils/curl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index 6a67b98b915fe..5f594cc8df07a 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -456,7 +456,7 @@ def curl_http_content_headers_and_checksum( end end file_contents = File.read(T.must(file.path), **open_args) - file_hash = Digest::SHA2.hexdigest(file_contents) if hash_needed + file_hash = Digest::SHA256.hexdigest(file_contents) if hash_needed end {