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:
commit
7b1000581c
|
@ -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 }: ["
|
||||
|
|
Loading…
Reference in a new issue