mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02: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)
|
remote_sources+=($index)
|
||||||
|
|
||||||
base_addresses[$index]=$(
|
base_address=$(
|
||||||
curl --compressed --netrc -fsL "$index" | \
|
curl --compressed --netrc -fsL "$index" | \
|
||||||
jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"')
|
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
|
done
|
||||||
|
|
||||||
echo "{ fetchNuGet }: ["
|
echo "{ fetchNuGet }: ["
|
||||||
|
|
Loading…
Reference in a new issue