nuget-to-json: use --netrc-optional for curl

Fixes: #389194
(cherry picked from commit 7a36c0ef0b08e07afec4f5300956941db2945efa)
This commit is contained in:
David McFarland
2025-03-18 11:50:45 +01:00
committed by Gutyina Gergő
parent 5918547a6f
commit 36721b0f8a
@@ -37,7 +37,7 @@ for index in "${sources[@]}"; do
remote_sources+=("$index")
base_address=$(
curl --compressed --netrc -fsSL "$index" |
curl --compressed --netrc-optional -fsSL "$index" |
jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"'
)
if [[ ! "$base_address" == */ ]]; then