diff --git a/build/DeployTasks/UploadArtifactsTask.cs b/build/DeployTasks/UploadArtifactsTask.cs index 3639c9a811d..c62da1857d0 100644 --- a/build/DeployTasks/UploadArtifactsTask.cs +++ b/build/DeployTasks/UploadArtifactsTask.cs @@ -57,16 +57,20 @@ public override async Task RunAsync(BuildContext context) void DeleteToolStore(BuildContext context, string path) { - if (System.IO.Directory.Exists(path)) { - var store = System.IO.Path.Combine (path, ".store"); - if (System.IO.Directory.Exists(store)) { + if (System.IO.Directory.Exists(path)) + { + var store = System.IO.Path.Combine(path, ".store"); + if (System.IO.Directory.Exists(store)) + { context.Log.Information($"Deleting: {store}"); System.IO.Directory.Delete(store, recursive: true); - foreach (var file in System.IO.Directory.GetFiles(path, "mgcb-*", System.IO.SearchOption.TopDirectoryOnly)) { + foreach (var file in System.IO.Directory.GetFiles(path, "mgcb-*", System.IO.SearchOption.TopDirectoryOnly)) + { context.Log.Information($"Deleting: {file}"); System.IO.File.Delete(file); } - foreach (var file in System.IO.Directory.GetFiles(path, "tools_version.txt", System.IO.SearchOption.TopDirectoryOnly)) { + foreach (var file in System.IO.Directory.GetFiles(path, "tools_version.txt", System.IO.SearchOption.TopDirectoryOnly)) + { context.Log.Information($"Deleting: {file}"); System.IO.File.Delete(file); }