Merge pull request #295812 from UlyssesZh/fix-nuget-to-nix-trailing-slash

nuget-to-nix: fix the bug of wrong url in the generated nix file when base url does not have trailing slash

authored by Weijia Wang and committed by GitHub 7b100058 f01fc7f1

+5 -1
+5 -1
pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh
··· 33 33 34 34 remote_sources+=($index) 35 35 36 - base_addresses[$index]=$( 36 + base_address=$( 37 37 curl --compressed --netrc -fsL "$index" | \ 38 38 jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"') 39 + if [[ ! "$base_address" == */ ]]; then 40 + base_address="$base_address/" 41 + fi 42 + base_addresses[$index]="$base_address" 39 43 done 40 44 41 45 echo "{ fetchNuGet }: ["