Skip to content

Commit

Permalink
Add retry to Restore Nuke task (#840)
Browse files Browse the repository at this point in the history
Restore tasks executes up to 3 times before it fails
  • Loading branch information
pellared authored Jun 14, 2022
1 parent 9514300 commit 950e89b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/nuke/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ partial class Build
Target Restore => _ => _
.After(Clean)
.Unlisted()
.Executes(() =>
.Executes(() => ControlFlow.ExecuteWithRetry(() =>
{

if (IsWin)
{
NuGetTasks.NuGetRestore(s => s
Expand All @@ -89,7 +90,7 @@ partial class Build
.When(!string.IsNullOrEmpty(NugetPackageDirectory), o =>
o.SetPackageDirectory(NugetPackageDirectory)));
}
});
}));

Target CompileManagedSrc => _ => _
.Unlisted()
Expand Down

0 comments on commit 950e89b

Please sign in to comment.