Closed stuartpa closed 2 years ago
I suspect this is because the AnsiConsole
instance explicitly is created with Ansi = true
instead of letting Spectre.Console detect ANSI support.
If someone produces me a build with the ability to control this via a command line switch I can test it.
I am not able to build the repo myself, currently, I'm getting:
Severity Code Description Project File Line Suppression State Error NETSDK1045 The current .NET SDK does not support targeting .NET 6.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 6.0. dotnet-repl C:\Program Files\dotnet\sdk\5.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 141
@stuartpa Try building this branch and see if it works: https://github.com/patriksvensson-forks/dotnet-repl/tree/feature/global-json
I can reproduce this and work out a fix.
I'd like to use dotnot-repl to validate notebooks in automation (CI/CD). When trying to redirect output, it errors:
C:\src>dotnet-repl --exit-after-run --notebook test.ipynb > out.txt Unhandled exception: System.NotSupportedException: Terminal does not support ANSI
Which prevents using dotnet-repl in any environment that captures stdout.