1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

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
This commit is contained in:
Weijia Wang 2024-04-05 06:31:00 +02:00 committed by GitHub
commit 7b1000581c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,9 +33,13 @@ for index in "${sources[@]}"; do
remote_sources+=($index)
base_addresses[$index]=$(
base_address=$(
curl --compressed --netrc -fsL "$index" | \
jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"')
if [[ ! "$base_address" == */ ]]; then
base_address="$base_address/"
fi
base_addresses[$index]="$base_address"
done
echo "{ fetchNuGet }: ["