mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-02 01:03:32 +01:00
Register the console lazily in CLI type registrar
This should fix a strange bug we're seeing in Cake on macOS.
This commit is contained in:
committed by
Patrik Svensson
parent
fd217ffc83
commit
28e9c14de4
@@ -24,7 +24,7 @@ namespace Spectre.Console.Cli
|
||||
}
|
||||
|
||||
_registrar.RegisterInstance(typeof(IConfiguration), configuration);
|
||||
_registrar.RegisterInstance(typeof(IAnsiConsole), configuration.Settings.Console.GetConsole());
|
||||
_registrar.RegisterLazy(typeof(IAnsiConsole), () => configuration.Settings.Console.GetConsole());
|
||||
|
||||
// Create the command model.
|
||||
var model = CommandModelBuilder.Build(configuration);
|
||||
|
||||
Reference in New Issue
Block a user