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

WIP - FIx large push #2555

Merged
merged 1 commit into from Jul 26, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Paket.Core/Common/Utils.fs
Expand Up @@ -567,8 +567,15 @@ let createHttpClient (url,auth:Auth option) =
client

#if USE_WEB_CLIENT_FOR_UPLOAD
type CustomTimeoutWebClient(timeout) =
inherit WebClient()
override x.GetWebRequest (uri:Uri) =
let w = base.GetWebRequest(uri)
w.Timeout <- timeout
w

let createWebClient (url,auth:Auth option) =
let client = new WebClient()
let client = new CustomTimeoutWebClient(20 * 60 * 1000)
client.Headers.Add("User-Agent", "Paket")
client.Proxy <- getDefaultProxyFor url

Expand Down
7 changes: 5 additions & 2 deletions src/Paket.Core/PublicAPI.fs
Expand Up @@ -669,8 +669,11 @@ type Dependencies(dependenciesFileName: string) =
Some(key)
| None -> None

let configKey = url |> Option.bind ConfigFile.GetAuthentication |> Option.bind (fun a -> match a with Token t -> Some t | _ -> None )
let firstPresentKey =
let configKey =
let url = defaultArg url "https://nuget.org"
ConfigFile.GetAuthentication url |> Option.bind (fun a -> match a with Token t -> Some t | _ -> None )

let firstPresentKey =
[apiKey; envKey; configKey]
|> List.choose id
|> List.where (String.IsNullOrEmpty >> not)
Expand Down
4 changes: 2 additions & 2 deletions src/Paket/Paket.fsproj
Expand Up @@ -31,8 +31,8 @@
<StartAction>Project</StartAction>
<StartProgram>paket.exe</StartProgram>
<StartAction>Project</StartAction>
<StartArguments>restore -v --group Release</StartArguments>
<StartWorkingDirectory>D:\temp\isaac</StartWorkingDirectory>
<StartArguments>-v push file nuget/legacy/FAKE.5.0.0-alpha012.nupkg</StartArguments>
<StartWorkingDirectory>C:\proj\FAKE\</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
Expand Down