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

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

Fixes #11996.
This commit is contained in:
Eelco Dolstra 2024-12-05 16:02:35 +01:00
parent a8a572b11b
commit 52f1cd0595
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.