Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Retry restore
  • Loading branch information
KevinRansom committed Jun 13, 2018
commit b57a20ccca69603807ae645fcd9bc22fb5cf0535
11 changes: 6 additions & 5 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ Target "Restore" (fun _ ->
// We assume a paket restore has already been run
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n"
for p in [ "../packages.config" ] do
ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
|> assertExitCodeZero
let executeProcess () =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should add a parameter "trials" and only retry 5 times

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended it to only retry 1 time. I figured that would be sufficient to eliminate the annoyance. And ... how is your vacation?

ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
if executeProcess () <> 0 then executeProcess () |> assertExitCodeZero
)

Target "BuildVersion" (fun _ ->
Expand Down