nuget-to-json: fix missing tool packages (#388841)

This commit is contained in:
David McFarland
2025-03-11 18:54:45 -03:00
committed by GitHub
@@ -62,7 +62,8 @@ done
fi
# packages in the nix store should have an empty metadata file
used_source="$(jq -r 'if has("source") then .source else "" end' "$version"/.nupkg.metadata)"
# packages installed with 'dotnet tool' may be missing 'source'
used_source="$(jq -r 'if has("source") then .source elif has("contentHash") then "__unknown" else "" end' "$version"/.nupkg.metadata)"
found=false
if [[ -z "$used_source" || -d "$used_source" ]]; then