Skip to content

Commit

Permalink
Show path when directory delete fails in test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dsplaisted committed Aug 24, 2017
1 parent 4ccf1b6 commit 61e68e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ public TestAssetInstance(TestAssetInfo testAssetInfo, DirectoryInfo root)

if (Root.Exists)
{
Root.Delete(recursive: true);
try
{
Root.Delete(recursive: true);
}
catch (IOException ex)
{
throw new InvalidOperationException("Unable to delete directory: " + Root.FullName, ex);
}
}

Root.Create();
Expand Down

0 comments on commit 61e68e6

Please sign in to comment.