Skip to content

Commit

Permalink
fix #2138
Browse files Browse the repository at this point in the history
  • Loading branch information
drwatson1 committed Feb 17, 2017
1 parent 0140699 commit 0187bfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ let rec private getPackageDetails root force (sources:PackageSource list) packag
return Some(source,result) }

let tryV3 source nugetSource = async {
if nugetSource.Url.Contains("myget.org") || nugetSource.Url.Contains("nuget.org") || nugetSource.Url.Contains("visualstudio.com") then
if nugetSource.Url.Contains("myget.org") || nugetSource.Url.Contains("nuget.org") || nugetSource.Url.Contains("visualstudio.com") || nugetSource.Url.Contains("/nuget/v3/") then
match NuGetV3.calculateNuGet2Path nugetSource.Url with
| Some url ->
let! result =
Expand Down
1 change: 1 addition & 0 deletions src/Paket.Core/NuGetV3.fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ let calculateNuGet2Path(nugetUrl:string) =
| "http://api.nuget.org/v3/index.json" -> Some "http://www.nuget.org/api/v2"
| "https://api.nuget.org/v3/index.json" -> Some "https://www.nuget.org/api/v2"
| url when url.EndsWith("/nuget/v3/index.json") && url.Contains("pkgs.visualstudio.com") -> Some (url.Replace("/nuget/v3/index.json","/nuget/v2"))
| url when url.EndsWith("/nuget/v3/index.json") -> Some (url.Replace("/nuget/v3/index.json","/nuget/v2")) // For on-premise TFS we don't know host as for VSTS
| url when url.EndsWith("/api/v3/index.json") && url.Contains("visualstudio.com") -> Some (url.Replace("/api/v3/index.json",""))
| url when url.EndsWith("/api/v3/index.json") && url.Contains("myget.org") -> Some (url.Replace("/api/v3/index.json",""))
| url when url.EndsWith("v2") -> Some url
Expand Down

0 comments on commit 0187bfe

Please sign in to comment.