1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Elaborate the "unknown hash algorithm" error

List the allowed hash formats
This commit is contained in:
Yueh-Shun Li 2023-10-09 11:00:14 +08:00
parent e9ddf0b400
commit aff177d860
2 changed files with 2 additions and 2 deletions

View file

@ -401,7 +401,7 @@ HashType parseHashType(std::string_view s)
if (opt_h)
return *opt_h;
else
throw UsageError("unknown hash algorithm '%1%'", s);
throw UsageError("unknown hash algorithm '%1%', expect 'md5', 'sha1', 'sha256', or 'sha512'", s);
}
std::string_view printHashType(HashType ht)