Make template package uninstallation detection report errors properly
This commit is contained in:
parent
cb500fe3b8
commit
148e4af837
|
|
@ -74,8 +74,7 @@ namespace Templates.Test.Helpers
|
||||||
// Verify we really did remove the previous templates
|
// Verify we really did remove the previous templates
|
||||||
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
|
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
|
||||||
Directory.CreateDirectory(tempDir);
|
Directory.CreateDirectory(tempDir);
|
||||||
try
|
|
||||||
{
|
|
||||||
var proc = ProcessEx.Run(
|
var proc = ProcessEx.Run(
|
||||||
output,
|
output,
|
||||||
tempDir,
|
tempDir,
|
||||||
|
|
@ -86,12 +85,9 @@ namespace Templates.Test.Helpers
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
|
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
Directory.Delete(tempDir);
|
Directory.Delete(tempDir);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static string FindAncestorDirectoryContaining(string filename)
|
private static string FindAncestorDirectoryContaining(string filename)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue