-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.TemplateEngine.Abstractions; | ||
using Microsoft.TemplateEngine.Edge; | ||
|
@@ -74,7 +75,22 @@ public string CreateTemporaryFolder(string name = "") | |
|
||
public void Dispose() | ||
{ | ||
_foldersToCleanup.ForEach(f => Directory.Delete(f, true)); | ||
_foldersToCleanup.ForEach(f => | ||
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-citest/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
Check failure on line 78 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-citest/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L78
|
||
{ | ||
if (Directory.Exists(f)) | ||
{ | ||
try | ||
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build Linux release_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-ci (Build OSX debug_configuration)test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-citest/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
Check failure on line 82 in test/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs Azure Pipelines / templating-citest/Microsoft.TemplateEngine.TestHelper/EnvironmentSettingsHelper.cs#L82
|
||
{ | ||
Directory.Delete(f, true); | ||
} | ||
catch | ||
{ | ||
Thread.Sleep(2000); | ||
Directory.Delete(f, true); | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
} |