Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Spectra.Console formatting #42

Merged
merged 1 commit into from
Aug 3, 2024
Merged

Conversation

ardalis
Copy link
Contributor

@ardalis ardalis commented Jul 26, 2024

Added Spectre.Console
Configured 4 styles of output
Replaced all Console output with styled output

Fixes #41

Added Spectre.Console
Configured 4 styles of output
Replaced all Console output with styled output
@Webreaper Webreaper merged commit 581f01d into Webreaper:master Aug 3, 2024
1 check passed
@Webreaper
Copy link
Owner

Thank you!

@sliekens
Copy link
Contributor

sliekens commented Aug 12, 2024

I also tried this tool after recent discussion on X, but in my case the tool crashed with a Spectre error originating from the OutputExtensions added in this PR 😀.

I think the error message contains some [] brackets which Spectre interprets as (invalid) markup. Should be easy to fix by replacing AnsiConsole.MarkupLine with MarkupInterpolatedLine.

Unhandled exception. System.InvalidOperationException: Could not find color or style 'T'.
   at Spectre.Console.StyleParser.Parse(String text) in /_/src/Spectre.Console/StyleParser.cs:line 10
   at Spectre.Console.MarkupParser.Parse(String text, Style style) in /_/src/Spectre.Console/Internal/Text/Markup/MarkupParser.cs:line 29
   at Spectre.Console.AnsiConsoleExtensions.Markup(IAnsiConsole console, String value) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 77
   at Spectre.Console.AnsiConsoleExtensions.Markup(IAnsiConsole console, IFormatProvider provider, String format, Object[] args) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 47
   at Spectre.Console.AnsiConsoleExtensions.MarkupLine(IAnsiConsole console, IFormatProvider provider, String format, Object[] args) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 129
   at Spectre.Console.AnsiConsoleExtensions.MarkupLine(IAnsiConsole console, String format, Object[] args) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 88
   at Spectre.Console.AnsiConsole.MarkupLine(String format, Object[] args) in /_/src/Spectre.Console/AnsiConsole.Markup.cs:line 91
   at CentralisedPackageConverter.Output.ErrorLine(String message, Object[] args) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/OutputExtensions.cs:line 14
   at CentralisedPackageConverter.Output.ErrorLine(String message) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/OutputExtensions.cs:line 13
   at Program.<Main>$(String[] args) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/Program.cs:line 17
Aborted

image

@ardalis
Copy link
Contributor Author

ardalis commented Aug 13, 2024

I think the latest PR addressed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Problems Stand Out in Console Output
3 participants