1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 16:02:43 +01:00

nix hash convert: Support SRI hashes that lack trailing '=' characters

Fixes #11996.

(cherry picked from commit 52f1cd0595)
This commit is contained in:
Eelco Dolstra 2024-12-05 16:02:35 +01:00 committed by Mergify
parent 218cd6c16c
commit 26741bcfda
3 changed files with 16 additions and 10 deletions

View file

@ -134,7 +134,8 @@ std::string Hash::to_string(HashFormat hashFormat, bool includeAlgo) const
Hash Hash::dummy(HashAlgorithm::SHA256);
Hash Hash::parseSRI(std::string_view original) {
Hash Hash::parseSRI(std::string_view original)
{
auto rest = original;
// Parse the has type before the separater, if there was one.