Skip to content

Commit 8fed26c

Browse files
authored
nuget-to-json: fix missing tool packages (#388841)
2 parents 89cca4c + 42a751a commit 8fed26c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ done
6262
fi
6363

6464
# packages in the nix store should have an empty metadata file
65-
used_source="$(jq -r 'if has("source") then .source else "" end' "$version"/.nupkg.metadata)"
65+
# packages installed with 'dotnet tool' may be missing 'source'
66+
used_source="$(jq -r 'if has("source") then .source elif has("contentHash") then "__unknown" else "" end' "$version"/.nupkg.metadata)"
6667
found=false
6768

6869
if [[ -z "$used_source" || -d "$used_source" ]]; then

0 commit comments

Comments
 (0)