Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Pack3r.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ public static Task<int> Main(string[] args)
args = valid;
}

return Cli.RunAsync<RootCommand>(args);
return Cli.RunAsync<RootCommand>(args, new CliSettings
{
Theme = new CliTheme(CliTheme.Default)
{
DefaultBgColor = System.Console.BackgroundColor,
},
});
}

public static async Task<int> Execute(PackOptions options)
Expand Down
3 changes: 2 additions & 1 deletion Pack3r.Core/Logging/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public void Drain()

private void LogInternalNoLock(LogLevel level, string message, string? context)
{
Console.ResetColor();

if (_minimumLogLevel == LogLevel.None)
{
Debug.Assert(level is LogLevel.Fatal, $"Invalid None loglevel got through: {level}");
Expand All @@ -118,7 +120,6 @@ private void LogInternalNoLock(LogLevel level, string message, string? context)

if (!prefix.IsEmpty)
{

if (backgroundColor.HasValue)
{
Console.BackgroundColor = backgroundColor.Value;
Expand Down