Skip to content

Commit 2a44e77

Browse files
authored
Merge pull request #1482 from MaxDeg/master
fix bug in getLastNuGetVersion when result is in JSON.
2 parents cd6ca9a + 947ea4e commit 2a44e77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/FakeLib/NuGet/NugetVersion.fs

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ open System.Xml
88
open System.Xml.Linq
99

1010
type NuGetSearchItemResult =
11-
{ Version:string
11+
{ Id:string
12+
Version:string
1213
Published:DateTime }
1314
type NuGetSearchResult =
1415
{ results:NuGetSearchItemResult list }
@@ -59,6 +60,7 @@ let getLastNuGetVersion server (packageName:string) =
5960
then
6061
let json = JsonConvert.DeserializeObject<NuGetSearchResponse>(text)
6162
json.d.results
63+
|> Seq.filter (fun i -> i.Id = packageName)
6264
|> Seq.sortByDescending (fun i -> i.Published)
6365
|> Seq.tryHead
6466
|> fun i ->

0 commit comments

Comments
 (0)