cake
cake copied to clipboard
GH4278: Update Spectre.Console to 0.48.0
- fixes #4278
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.
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 can find away around that, can't use the default Spectre version command as it will produce a version string that will break Cake cli contract. Overriding command settings ApplicationVersion and removing cake version feature should probably achieve the same result for end user.
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.