mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 17:02:51 +08:00
Detect non-interactive console via System.Console.IsInputRedirected instead of Environment.UserInteractive
This commit is contained in:
parent
2bd1383cbe
commit
90c2d988ab
@ -40,7 +40,7 @@ public sealed class AnsiConsoleFactory
|
|||||||
var interactive = settings.Interactive == InteractionSupport.Yes;
|
var interactive = settings.Interactive == InteractionSupport.Yes;
|
||||||
if (settings.Interactive == InteractionSupport.Detect)
|
if (settings.Interactive == InteractionSupport.Detect)
|
||||||
{
|
{
|
||||||
interactive = Environment.UserInteractive;
|
interactive = !System.Console.IsInputRedirected;
|
||||||
}
|
}
|
||||||
|
|
||||||
var profile = new Profile(output, encoding);
|
var profile = new Profile(output, encoding);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user