Skip to content
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
9 changes: 8 additions & 1 deletion src/Paket.Core/Common/Utils.fs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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