Skip to content

Commit 2dba627

Browse files
Update src/Genocs.WebApi.Security/Extensions.cs
Co-authored-by: Copilot <[email protected]>
1 parent 4567d2a commit 2dba627

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Genocs.WebApi.Security/Extensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ public static IGenocsBuilder AddCertificateAuthentication(
3535
builder.Services.AddSingleton(options);
3636
if (!builder.TryRegister(RegistryName))
3737
{
38-
Console.WriteLine("{RegistryName} registration failed.", RegistryName, ConsoleColor.Red);
38+
var previousColor = Console.ForegroundColor;
39+
Console.ForegroundColor = ConsoleColor.Red;
40+
Console.WriteLine($"{RegistryName} registration failed.");
41+
Console.ForegroundColor = previousColor;
3942
return builder;
4043
}
4144

0 commit comments

Comments
 (0)