From 5265bd95160fc94920a3bf723e839cd00fda5ca1 Mon Sep 17 00:00:00 2001 From: Lubos Hladik Date: Wed, 20 Oct 2021 20:19:43 +0200 Subject: [PATCH] Add retry to SetCloudBuildVariable method in VisualStudioTeamServices. --- .../CloudBuildServices/VisualStudioTeamServices.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NerdBank.GitVersioning/CloudBuildServices/VisualStudioTeamServices.cs b/src/NerdBank.GitVersioning/CloudBuildServices/VisualStudioTeamServices.cs index 0b3da5f2..fcaf7f1d 100644 --- a/src/NerdBank.GitVersioning/CloudBuildServices/VisualStudioTeamServices.cs +++ b/src/NerdBank.GitVersioning/CloudBuildServices/VisualStudioTeamServices.cs @@ -33,7 +33,8 @@ public IReadOnlyDictionary SetCloudBuildNumber(string buildNumbe public IReadOnlyDictionary SetCloudBuildVariable(string name, string value, TextWriter stdout, TextWriter stderr) { - (stdout ?? Console.Out).WriteLine($"##vso[task.setvariable variable={name};]{value}"); + Utilities.FileOperationWithRetry(() => + (stdout ?? Console.Out).WriteLine($"##vso[task.setvariable variable={name};]{value}")); return GetDictionaryFor(name, value); }