Skip to content

Commit 205c667

Browse files
Fix directory creation and cleanup in tests
1 parent 72cedf0 commit 205c667

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/GitVersionCore.Tests/DynamicRepositoryTests.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ public void CreateTemporaryRepository()
1717
workDirectory = Path.Combine(Path.GetTempPath(), "GV");
1818

1919
// Clean directory upfront, some build agents are having troubles
20-
Directory.Delete(workDirectory, true);
20+
if (Directory.Exists(workDirectory))
21+
{
22+
Directory.Delete(workDirectory, true);
23+
}
24+
25+
Directory.CreateDirectory(workDirectory);
2126
}
2227

2328

0 commit comments

Comments
 (0)