Skip to content

Commit cb500fe

Browse files
Account for non-installed templates when preparing test run
1 parent 5eeee55 commit cb500fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/Templates.Test/Helpers/TemplatePackageInstaller.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ private static void ReinstallTemplatePackages(ITestOutputHelper output)
4141
Directory.GetCurrentDirectory(),
4242
"dotnet",
4343
$"new --uninstall {packageName}");
44-
proc.WaitForExit(assertSuccess: true);
44+
45+
// We don't need this command to succeed, because we'll verify next that
46+
// uninstallation had the desired effect. This command is expected to fail
47+
// in the case where the package wasn't previously installed.
48+
proc.WaitForExit(assertSuccess: false);
4549
}
4650

4751
VerifyCannotFindTemplate(output, "ASP.NET Core Empty");

0 commit comments

Comments
 (0)