Mattias Karlsson

Results 126 comments of Mattias Karlsson

Basically should be a matter of replacing IConsole ( https://github.com/cake-build/cake/blob/develop/src/Cake.Core/IConsole.cs )

@Marusyk going the JSON route seems like the best option and an object model provides the most value in a Cake context.

> ok, so should we allow only `--format json` and have the alias like `public ListPackage List(Project, Settings)`? Yes, think that makes sense.

Thin it's just a wrapper around NuGet.CommandLine.XPlat which probably means the code is somewhere around here https://github.com/NuGet/NuGet.Client/tree/dev/src/NuGet.Core/NuGet.CommandLine.XPlat/ListPackage

It would seem Spectre.Console 0.48.0 has a breaking change with settings like https://github.com/cake-build/cake/blob/ed612029b92f5da2b6cbdfe295c62e6b99a2963d/src/Cake/Commands/DefaultCommandSettings.cs#L55-L57 This test fails https://github.com/cake-build/cake/blob/ed612029b92f5da2b6cbdfe295c62e6b99a2963d/src/Cake.Tests/Unit/ProgramTests.cs#L101-L104 only the last `--ver` works. ![image](https://github.com/cake-build/cake/assets/1647294/e4cda945-8dd1-43c2-bcc0-c73cbcc30c96) not investigated the root cause fully.

Found the issue Spectre.Console.Cli no longer allows default commands to have a `--version` parameter, which Cake relied on to have it's own custom version command. https://github.com/spectreconsole/spectre.console/commit/131b37fff858f8d5dd483ff369bb3d43a07c1e08#diff-d38c9fa48d9c39f8eec58957b2333d13943f2cbe1adee26f30325e527a56f600L26-R41 Will see if I...

As it's by design breaking change in Spectre.Console.Cli, I just added a workaround to opt-out of this behavior for Cake.Tool.

This is by design, you can register multiple types by running Setup multiple with different types, if base type was registered this wouldn't be possible. But you could opt-in to...

@aateeque how does the #addin directive/in you build.cake

Hmm not sure I'm following if I have this console ```csharp public static class Program { public static async Task Main(string[] args) { await Task.CompletedTask; } } ``` Executing that...