Add retry to Restore Nuke task (#840)

Restore tasks executes up to 3 times before it fails
This commit is contained in:
Robert Pająk 2022-06-14 09:34:05 +02:00 committed by GitHub
parent 951430036f
commit 950e89be18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -69,8 +69,9 @@ partial class Build
Target Restore => _ => _
.After(Clean)
.Unlisted()
.Executes(() =>
.Executes(() => ControlFlow.ExecuteWithRetry(() =>
{
if (IsWin)
{
NuGetTasks.NuGetRestore(s => s
@ -89,7 +90,7 @@ partial class Build
.When(!string.IsNullOrEmpty(NugetPackageDirectory), o =>
o.SetPackageDirectory(NugetPackageDirectory)));
}
});
}));
Target CompileManagedSrc => _ => _
.Unlisted()