Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve another error when restoring packages. #2434

Merged
merged 2 commits into from
Jun 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Paket.Core/Dependencies/NuGet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,9 @@ let DownloadPackage(alternativeProjectRoot, root, (source : PackageSource), cach
| Some(Credentials(_)) -> true
| _ -> false)
-> do! download false (attempt + 1)
| exn when String.IsNullOrWhiteSpace !downloadUrl -> failwithf "Could not download %O %O.%s %s" packageName version Environment.NewLine exn.Message
| exn -> failwithf "Could not download %O %O from %s.%s %s" packageName version !downloadUrl Environment.NewLine exn.Message }
| exn when String.IsNullOrWhiteSpace !downloadUrl ->
raise <| Exception(sprintf "Could not download %O %O." packageName version, exn)
| exn -> raise <| Exception(sprintf "Could not download %O %O from %s." packageName version !downloadUrl, exn) }

async {
do! download true 0
Expand Down
4 changes: 2 additions & 2 deletions src/Paket.Core/Dependencies/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ let getDetailsFromNuGetViaOData auth nugetURL (packageName:PackageName) (version
traceWarnfn "Failed to get package details (again) '%s'. This feeds implementation might be broken." e.Message
if verbose then tracefn "Details: %O" e
// try uppercase version as workaround for https://github.com/fsprojects/Paket/issues/2145 - Bad!
let name = PackageName.ToString()
let uppercase = PackageName.ToString().[0].ToString().ToUpper() + name.Substring(1)
let name = packageName.ToString()
let uppercase = packageName.ToString().[0].ToString().ToUpper() + name.Substring(1)
return! queryPackagesProtocol (PackageName uppercase)
}

Expand Down