Skip to content
Merged
Changes from 2 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
14 changes: 9 additions & 5 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,15 @@ 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 rec executeProcess count =
let result = 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 result <> 0 && count > 1 then executeProcess (count - 1) else 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should read ... else result so that if the 5 tries are exhausted the last error code is returned.

(executeProcess 5) |> assertExitCodeZero


)

Target "BuildVersion" (fun _ ->
Expand Down