From f79c73c2ca8b4d01c78eb1448bd85e9c12405ad8 Mon Sep 17 00:00:00 2001 From: mdarocha Date: Fri, 14 Jul 2023 00:51:15 +0200 Subject: [PATCH] dotnet-sdk: update.sh - fail if determining a nuget hash fails --- pkgs/development/compilers/dotnet/update.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/compilers/dotnet/update.sh b/pkgs/development/compilers/dotnet/update.sh index 9ffe00437e79..5f991ce823c5 100755 --- a/pkgs/development/compilers/dotnet/update.sh +++ b/pkgs/development/compilers/dotnet/update.sh @@ -64,6 +64,11 @@ generate_package_list() { local url hash url="${nuget_url}${pkg,,}/${version,,}/${pkg,,}.${version,,}.nupkg" hash="$(nix-prefetch-url "$url")" + if [[ -z "$hash" ]]; then + echo "Failed to fetch hash for $url" >&2 + exit 1 + fi + echo " (fetchNuGet { pname = \"${pkg}\"; version = \"${version}\"; sha256 = \"${hash}\"; })" done }