fetchnuget: improve "multiple hashes" error message
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
buildDotnetPackage,
|
buildDotnetPackage,
|
||||||
unzip,
|
unzip,
|
||||||
@@ -14,10 +15,12 @@ attrs@{
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
if md5 != "" then
|
if md5 != "" then
|
||||||
throw "fetchnuget does not support md5 anymore, please use 'hash' attribute with SRI hash"
|
throw "fetchnuget does not support md5 anymore, please use 'hash' attribute with SRI hash: ${
|
||||||
|
lib.generators.toPretty { } attrs
|
||||||
|
}"
|
||||||
# This is also detected in fetchurl, but we just throw here to avoid confusion
|
# This is also detected in fetchurl, but we just throw here to avoid confusion
|
||||||
else if (sha256 != "" && hash != "") then
|
else if (sha256 != "" && hash != "") then
|
||||||
throw "multiple hashes passed to fetchNuGet"
|
throw "multiple hashes passed to fetchNuGet: ${lib.generators.toPretty { } url}"
|
||||||
else
|
else
|
||||||
buildDotnetPackage (
|
buildDotnetPackage (
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user